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 - Amal #34

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

Branches - Amal #34

wants to merge 3 commits into from

Conversation

ashassan
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? My understanding of conditionals, loops, and other data types.
Did you need to use different strategies to find information online about JavaScript than you would for Ruby? No, I used the same strategies to figure out things. I did test things in node to better understand and verify what I was doing was working the way I expected.
What was a challenge you were able to overcome on this assignment? A challenge was figuring out ways to do things in javascript when ruby had something that javascript didn't. Also syntax was also another challenge.
What has been interesting and positive about learning a new programming language? It is nice having ruby as a comparison. I find myself just thinking of how I would do it in ruby and translating it to javascript.
What is something to focus on your learnings in JavaScript in the next week? I want to focus on getting better with syntax and testing.

@tildeee
Copy link

tildeee commented Nov 27, 2019

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
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, Amal! 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!

Also, sorry about how late this grading is. Let me know if you have any questions

let hand = [];

for (let i = 0; i < 10; i += 1) {
const randomIndex = Math.floor(Math.random() * 99);
Copy link

Choose a reason for hiding this comment

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

Where does this 99 come from? If it represents something (like the length of letterPool), maybe give it a variable name. If it doesn't, then how can we make this number meaningful?

if (handObj[letter]){
handObj[letter] -= 1;
if (handObj[letter] == 0) {
delete handObj[letter];
Copy link

Choose a reason for hiding this comment

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

Instead of using this delete command, it'd be better to set handObj[letter] = null


scoreWord(word) {
let score = 0;
let letterScore = {
Copy link

Choose a reason for hiding this comment

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

letterScore can be a const

beccaelenzil added a commit to beccaelenzil/js-adagrams that referenced this pull request Jun 2, 2022
Revert "remove @babel line from babel.config"
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