Skip to content

Comments

Mamadou Leye 'scrabble.js done'#206

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

Mamadou Leye 'scrabble.js done'#206
homonoviscoding wants to merge 1 commit intoboolean-uk:mainfrom
homonoviscoding:main

Conversation

@homonoviscoding
Copy link

No description provided.

}

// transform input to uppercase if it is not and split the string
const input = characters.toUpperCase().split('')
Copy link
Contributor

Choose a reason for hiding this comment

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

upperCaseCharacters

let result = 0
// Iterate over each input letter and return 0 if the Object's properties above don't include one of the input's letters
// return in result the sum of result and the values of each Obj. properties that include input[i] in the loop.
for (let i = 0; i < input.length; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

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

const character = input[i]

// Iterate over each input letter and return 0 if the Object's properties above don't include one of the input's letters
// return in result the sum of result and the values of each Obj. properties that include input[i] in the loop.
for (let i = 0; i < input.length; i++) {
if (!Object.keys(pointRef).includes(input[i])) {
Copy link
Contributor

Choose a reason for hiding this comment

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

if (!Object.keys(pointRef).includes(character))

}
return result
}
console.log(scrabble('street'))
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