Skip to content

Leaves - Alice #33

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

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

Leaves - Alice #33

wants to merge 5 commits into from

Conversation

sun-alice
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? I was able to recognize what needed to be done in Ruby, and just had to look up how to do it in Javascript.
Did you need to use different strategies to find information online about JavaScript than you would for Ruby? Not really!
What was a challenge you were able to overcome on this assignment? I was able to overcome the challenge of not being able to break out of a forEach loop-- using a for in loop instead.
What has been interesting and positive about learning a new programming language? I feel like it is much easier and faster than learning Ruby! I think that it is because all these things in JS are not completely new, since we have seen it in Ruby before. Changing the syntax is much easier than learning a completely new concept.
What is something to focus on your learnings in JavaScript in the next week? I want to gain clarity on loops in JS, and what kind of built in methods are available.

@@ -1,7 +1,156 @@
const Adagrams = {
drawLetters() {
// Implement this method for wave 1
let letterPool = (

Choose a reason for hiding this comment

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

This should be a const

Choose a reason for hiding this comment

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

Consider first creating an object that represents letter frequencies and then using this object to build your array.

let points = 0;

for (let letter in split) {
switch (split[letter]) {

Choose a reason for hiding this comment

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

Good approach using a switch/case conditional! You probably could refactor this to use an object (a hash) though.

).split("");
let hand = [];

for (let i = 0; i < 10; i++) {

Choose a reason for hiding this comment

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

You're modifying your letterPool here. Make sure to make a deep copy first. In addition, consider how you could refactor such that you don't shuffle the pool 10 times.

@beccaelenzil
Copy link

JS Adagrams

What We're Looking For

Feature Feedback
General
Answered comprehension questions yes
Small commits with meaningful commit messages yes
Code Requirements
drawLetters method
Uses appropriate data structure to store the letter distribution see comment
All tests for drawLetters pass yes
usesAvailableLetters method
All tests for usesAvailableLetters pass yes
scoreWord method
Uses appropriate data structure to store the letter scores see comment
All tests for scoreWord pass yess
Optional
highestScoreFrom method
Appropriately handles edge cases for tie-breaking logic yes
All tests for highestScoreFrom pass yes
Overall Great work on this project! In this project you’ve taken some interesting logic and worked it into JavaScript syntax. I’m adding a few comments for you to review, but overall, you’ve done a great job of practicing syntax.

beccaelenzil added a commit to beccaelenzil/js-adagrams that referenced this pull request Jun 2, 2022
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