-
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
Sara Chandler -- Carets #30
base: master
Are you sure you want to change the base?
Conversation
|
||
totalScore() { | ||
let sumScore = 0; | ||
this.plays.forEach((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.
Just FYI there is a .reduce
function in JavaScript.
@@ -1,14 +1,149 @@ | |||
|
|||
const Scrabble = { | |||
score: function(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 could also be written:
score(word) {
score = 0; | ||
} | ||
|
||
let wordArr = word.split(""); |
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 never reassign wordArr
making it a const
is a good idea.
JS ScrabbleWhat We're Looking For
|
JS Scrabble
Congratulations! You're submitting your assignment!
Comprehension Questions