-
Notifications
You must be signed in to change notification settings - Fork 42
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
Karinna Iniguez - JS Scrabble - Octos #26
base: master
Are you sure you want to change the base?
Conversation
JS ScrabbleWhat We're Looking For
|
let letter = word.charAt(i).toLowerCase() | ||
total += SCORE[letter] | ||
} | ||
return total |
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.
You did well with semi-colons at the beginning of this function but lost it by the end!
|
||
arrayOfWords.forEach(function(word){ | ||
if ( Scrabble.score(word) > highScore ) { | ||
highScore = Scrabble.score(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.
By using this function in both places, you are doing this calculating time. Consider storing in a variable so you only need to do the calculation once.
JS Scrabble
Congratulations! You're submitting your assignment!
Comprehension Questions