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

<pipes><Roxanne Agerone><js scrabble> #37

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

Conversation

RAgerone
Copy link

JS Scrabble

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? There are many similarities between JavaScript and Ruby. I was able to use a lot of the if/else logic as well as string and array manipulation.
What was a challenge you were able to overcome on this assignment? I was able to overcome the throwing of errors. There were several ways that I found upon searching, but I opted for the simplest way. I am still curious about iterating over hashes in Javascript
What is your favorite thing about learning a new programming language? I enjoy solving new puzzles and finding new ways to use logic.
What is your least favorite thing about learning a new programming language? My least favorite thing is when I cannot find an answer because I don't know the search terms for the language yet.
In the long run, this increases my overall satisfaction with solving the problem.
Do you have any recommendations on how we could improve this project for the next cohort? It was perfect. It was not intimidating and the students can find most of the methods for solving the problems in their Ruby knowledge.

@droberts-sea
Copy link

JS Scrabble

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene could be better - even on a small project like this, it's important to break work up into discrete chunks
Comprehension questions yes
General
score calculates score, has appropriate params and return value yes
highestScoreFrom calculates highest scoring word, has appropriate params and return value yes
Player object
Has name and plays properties yes
Has play, totalScore, hasWon functions yes
Has highestScoringWord and highestWordScore functions yes
Overall Good work overall!

throw `This word is too long. Are you sure you aren't cheating?`;
} else if (wordArray.length === 0){
throw 'You have to choose a word.';
} else{}

Choose a reason for hiding this comment

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

You don't need this final empty else{} clause, you can just close the last else if.

let point = letter_points[letter.toUpperCase()];
// try {
if(point === undefined) {
throw 'not found';

Choose a reason for hiding this comment

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

Remember that the messages you throw will probably be seen by the user. 'not found' might not give them enough context to figure out what went wrong - something like `invalid letter ${ letter }`.


if (wordScore > highestScore || (highestScore === wordScore && word.length < highestScoringWord.length && highestScoringWord.length != 7) || (highestScore === wordScore && word.length === 7)){
highestScore = wordScore;
highestScoringWord = word;

Choose a reason for hiding this comment

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

This if logic is really long! Could you break it up into multiple lines? Something like

if (wordScore > highestScore ||
    (highestScore === wordScore && word.length < highestScoringWord.length && highestScoringWord.length != 7) ||
    (highestScore === wordScore && word.length === 7)) {

would be easier to read.

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