-
Notifications
You must be signed in to change notification settings - Fork 41
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
lauren pipes scrabble #46
base: master
Are you sure you want to change the base?
Conversation
JS ScrabbleWhat We're Looking For
|
highestWord = word; | ||
} else if (highestWord.length === 7) { | ||
} else if (word.length < highestWord.length) { | ||
highestWord = 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.
This block of code is pretty dense. It might help readability to use empty lines to break things up. Also, you've got a clause on your if statement with no code - I will typically leave a comment in this case, to reassure whoever comes next that I didn't just forget to write something there. Something like
} else if (highestWord.length === 7) {
// Keep highestWord (no-op)
} else if ...
let letter = word.toLowerCase().split(""); | ||
letter.forEach(function(char) { | ||
checkValidity(char); | ||
}); |
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.
Since you later call .score()
on the word, I don't think you need a separate validity check here.
JS Scrabble
Congratulations! You're submitting your assignment!
Comprehension Questions