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

Kayla Ecker - Caret #44

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

Kayla Ecker - Caret #44

wants to merge 2 commits into from

Conversation

kaylaecker
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? Overall strategy for how to orient the scrabble game
What was a challenge you were able to overcome on this assignment? The change of syntax, particularly now needing to say let etc
What is your favorite thing about learning a new programming language? Realizing that there it is fairly easy(ish) to pick up new languages once you learn one
What is your least favorite thing about learning a new programming language? Some of the fun Ruby tricks I learned can no longer be utilized.
Do you have any recommendations on how we could improve this project for the next cohort? more low level exercises before jumping in. It felt like it was assumed that we would pick up this language very quickly, but with the timeline we are also concerned with CS and splitting time so learning the language on our own was a bit difficult. Being provided more resources would have been beneficial. Overall was okay though!

@CheezItMan
Copy link

JS Scrabble

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene WAAAAAAAAAY too few commits!!! I do recognize you've done the same project in Ruby, but a little more granularity is better.
Comprehension questions Check
General
score calculates score, has appropriate params and return value Check
highestScoreFrom calculates highest scoring word, has appropriate params and return value Check
Player object
Has name and plays properties Check
Has play, totalScore, hasWon functions Check
Has highestScoringWord and highestWordScore functions Check
Overall You hit all the requirement. Two suggestions, One, turn on the linter and listen to it's advice. It will help you write cleaner, more concise code, Two, make use of the JavaScript array functions like map and reduce, they can help make things more compact.

score: function(word) {
// TODO: implement score
}
score: function(word) {

Choose a reason for hiding this comment

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

This could be written as:

score(word) {

}
score: function(word) {

let regex = /^[a-zA-Z]+$/;

Choose a reason for hiding this comment

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

Making variables you never reassign const is a good idea.

let score = 0;


for (let i = 0; i < lowercaseWord.length; i++) {

Choose a reason for hiding this comment

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

This works fine, you can also use reduce to calculate it.

Scrabble.Player = class {
constructor(name) {
if (name === undefined) {
throw new Error('Invalid - must be a name');

Choose a reason for hiding this comment

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

Good work creating an object to throw the error.

play(word) {
let regex = /^[a-zA-Z]+$/;

if (word === undefined || !regex.test(word)) {

Choose a reason for hiding this comment

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

Nice use of Regex

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