-
Notifications
You must be signed in to change notification settings - Fork 112
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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){ |
There was a problem hiding this comment.
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){ |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
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 = () => { |
There was a problem hiding this comment.
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
No description provided.