-
Notifications
You must be signed in to change notification settings - Fork 50
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
Branches - Angele #35
base: master
Are you sure you want to change the base?
Conversation
JS AdagramsWhat We're Looking For
Great work on this project, Angele! 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! I'm really happy with how much you experimented and did cool things with this project. Keep that up. :D Also, sorry about how late this grading is. Let me know if you have any questions |
"Z": {count: 1, points: 10}, | ||
}, | ||
|
||
drawCount: 10, |
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.
GREAT DECISION on letterInfo
and drawCount
!
if (!randomIndices.includes(randomIndex)) { | ||
randomIndices.push(randomIndex); | ||
} | ||
} |
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.
Nicely done. If you ever think about refactoring this, I think it might be interesting to refactor this while
loop so that: instead of pushing randomIndex
into randomIndices
until randomIndices
has a length of ten, and then mapping overrandomIndices in order to populate
drawnLetters... Consider using
randomIndiceson
letterPoolto populate/push into
drawnLetters` directly
}, | ||
|
||
usesAvailableLetters(input, lettersInHand) { | ||
const handCopy = [...lettersInHand]; |
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.
Nice syntax here!
letterPoints.push(8); | ||
} | ||
|
||
const wordPoints = letterPoints.reduce((total, points) => total + points, 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.
I love this reduce
!
}; | ||
|
||
console.log(Adagrams.usesAvailableLetters('poopies', ['p','o','o','l'])); |
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.
:P :)
Change Wave 1 comment to Wave 4
JS Adagrams
Congratulations! You're submitting your assignment!
Comprehension Questions