-
Notifications
You must be signed in to change notification settings - Fork 49
Branches - Amal #34
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
base: master
Are you sure you want to change the base?
Branches - Amal #34
Conversation
JS AdagramsWhat We're Looking For
Great work on this project, Amal! I have no complaints. I have a few comments on how to make this more "javascript-y" in syntax and code style. Otherwise, great work! Also, sorry about how late this grading is. Let me know if you have any questions |
| let hand = []; | ||
|
|
||
| for (let i = 0; i < 10; i += 1) { | ||
| const randomIndex = Math.floor(Math.random() * 99); |
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.
Where does this 99 come from? If it represents something (like the length of letterPool), maybe give it a variable name. If it doesn't, then how can we make this number meaningful?
| if (handObj[letter]){ | ||
| handObj[letter] -= 1; | ||
| if (handObj[letter] == 0) { | ||
| delete handObj[letter]; |
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.
Instead of using this delete command, it'd be better to set handObj[letter] = null
|
|
||
| scoreWord(word) { | ||
| let score = 0; | ||
| let letterScore = { |
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.
letterScore can be a const
Revert "remove @babel line from babel.config"
JS Adagrams
Congratulations! You're submitting your assignment!
Comprehension Questions