Skip to content

Comments

Sami Saeed#209

Open
samisalehsaeed wants to merge 1 commit intoboolean-uk:mainfrom
samisalehsaeed:main
Open

Sami Saeed#209
samisalehsaeed wants to merge 1 commit intoboolean-uk:mainfrom
samisalehsaeed:main

Conversation

@samisalehsaeed
Copy link

No description provided.

Comment on lines +10 to +12
if (word === null || word === undefined){
return 0
}
Copy link
Contributor

Choose a reason for hiding this comment

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

empty strings, 0, false

if (!word)

Copy link
Contributor

Choose a reason for hiding this comment

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

const upperCaseWord = word.toUpperCase()

}
let result = 0;
for (let i = 0; i < word.length; i++) {
let j = word[i].toUpperCase();
Copy link
Contributor

Choose a reason for hiding this comment

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

const letter

Copy link
Contributor

Choose a reason for hiding this comment

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

.toUpperCase(), call this earlier

}
return result
}
console.log(scrabble('sami'))
Copy link
Contributor

Choose a reason for hiding this comment

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

Try not to commit debug logs

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