Skip to content

Conversation

gyjin
Copy link

@gyjin gyjin commented Nov 18, 2019

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 used a lot of if and each loop logic that I learned in Ruby to write adagrams in JavaScript.
Did you need to use different strategies to find information online about JavaScript than you would for Ruby? Yes, sometimes I wanted to use the equivalent of something in Ruby to JavaScript and it was difficult to find documentation that translated from one language to another.
What was a challenge you were able to overcome on this assignment? Writing in JavaScript in general! JS is different than Ruby and it was frustrating to learn the little things you can't do in JS that you could do in Ruby.
What has been interesting and positive about learning a new programming language? It's easier than I thought!
What is something to focus on your learnings in JavaScript in the next week? I think just more practice in JS would be helpful. I still don't know the syntax and working with functions has been different, so just using it more is my focus.

@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 yes
Uses appropriate data structure to store the letter distribution yes -- style note: put these above the module
All tests for drawLetters pass yes
usesAvailableLetters method
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 N/A
Appropriately handles edge cases for tie-breaking logic N/A
All tests for highestScoreFrom pass N/A
Overall Good work overall. I really like that you store the letter frequencies and then build the pool on the fly - this is much easier to read than a giant array full of 9 'A's, 2 'B's, etc. In this project you’ve taken some interesting logic and worked it into JavaScript syntax. I’ve left a few inline comment for you to review, but overall, you’ve done a great job of practicing syntax.

// Do not remove this line or your tests will break!
export default Adagrams;

// used the Fisher-Yates Algorithm

Choose a reason for hiding this comment

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

Style note: move this function (shuffle()) and objects to inside the module, but above all of the other functions (drawLetters(), etc).

}
}

allLetters = shuffle(allLetters);

Choose a reason for hiding this comment

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

Here, you shuffle the entire array pool of letters... and then, you take the first ten. Consider how you could refactor this so that you randomly pick ten letters, instead of shuffling the entire array.

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