Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Branches - Angele #35

wants to merge 4 commits into from

Conversation

geli-gel
Copy link

JS Adagrams

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What patterns were you able to use from your Ruby knowledge to apply to JavaScript? Map and Reduce work almost the same in JS as in Ruby, and I'm able to use Arrays similarly, as well as Objects similarly to the way hashes are used. They also have similar string methods like toUpperCase vs upcase in Ruby.
Did you need to use different strategies to find information online about JavaScript than you would for Ruby? This was similar also - look at the different ways people solve similar problems, look at official documentation, and look at documentation that explains it in different ways (tutorial type articles, W3 schools website).
What was a challenge you were able to overcome on this assignment? It was a challenge to remember that Javascript is not just a copy of Ruby with lots of semi-colons, it's something different, but I was able to overcome that.
What has been interesting and positive about learning a new programming language? It is interesting to see that what I assume a certain method would return is not what I assume, just because it makes sense to return False if something isn't found in Ruby, doesn't mean it will be the same in Javascript.
What is something to focus on your learnings in JavaScript in the next week? Something I need to focus on in the next week is checking my assumptions and remembering when to use let over const to define variables.

@tildeee
Copy link

tildeee commented Nov 27, 2019

JS Adagrams

What We're Looking For

Feature Feedback
General
Answered comprehension questions Great answers! Perfect answers!
Small commits with meaningful commit messages yes
Code Requirements
drawLetters method yes
Uses appropriate data structure to store the letter distribution YES!
All tests for drawLetters pass yes
usesAvailableLetters method yes
All tests for usesAvailableLetters pass yes
scoreWord method yes
Uses appropriate data structure to store the letter scores yes
All tests for scoreWord pass yes
Optional
highestScoreFrom method
Appropriately handles edge cases for tie-breaking logic
All tests for highestScoreFrom pass
Overall

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,
Copy link

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);
}
}
Copy link

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 populatedrawnLetters... Consider usingrandomIndicesonletterPoolto populate/push intodrawnLetters` directly

},

usesAvailableLetters(input, lettersInHand) {
const handCopy = [...lettersInHand];
Copy link

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);
Copy link

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']));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:P :)

mmcknett pushed a commit to mmcknett/js-adagrams that referenced this pull request Jun 5, 2022
Change Wave 1 comment to Wave 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants