Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sea Turtles Carranza, Katina #114

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

kmcarranza
Copy link

No description provided.

Copy link

@tgoslee tgoslee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Katina you currently have 15 tests passing most of them aren't passing because you are using incorrect parameter names or JS syntax is off. Take a look at my comments to make the changes and get your test passing.

src/adagrams.js Outdated
};
const lettersInHandCopy = [...lettersInHand];
const word = input.toUpperCase
for (let letter of word){
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let could be a const here since we aren't alternating input

src/adagrams.js Outdated
};
const lettersInHandCopy = [...lettersInHand];
const word = input.toUpperCase
for (let letter of word){
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your test are failing here because you are using word but the parameter on line 54 is input

src/adagrams.js Outdated
for (letter in word.toUpperCase())
score += availableLetters[letter][1];

if (word.length >= 7)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (word.length >= 7)
if (word.length >= 7 && word.length <= 10) {

src/adagrams.js Outdated

export const scoreWord = (word) => {
// Implement this method for wave 3
score = 0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be let score = 0

'Y': [2,4],
'Z': [1,10]
}

export const drawLetters = () => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use the spread operator to make a copy of the letterPool
use a for loop to draw 10 letters
use math.floor to make the random draw
push the letter to letterHand
return letterHand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants