Skip to content

Commit 85cb835

Browse files
committed
cleaned up code for submission
1 parent 07ea34f commit 85cb835

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

scrabble-scorer.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function initialPrompt() {
3737
};
3838

3939
let newPointStructure = transform(oldPointStructure);
40-
console.log(newPointStructure);
40+
// console.log(newPointStructure);
4141

4242
let simpleScorer = function (word) {
4343
word = word.toUpperCase();
@@ -108,7 +108,6 @@ function scorerPrompt() {
108108

109109
function transform(oldPointStructureObject) {
110110
let newPointStructureObject = {};
111-
// loop through object
112111

113112
for (let key in oldPointStructureObject) {
114113
let letters = oldPointStructureObject[key];
@@ -122,21 +121,12 @@ function transform(oldPointStructureObject) {
122121
return newPointStructureObject;
123122
};
124123

125-
126-
// console.log("Letters with score '4':", oldPointStructure[4]);
127-
// console.log("3rd letter within the key '4' array:", oldPointStructure[4][2]);
128-
129-
// let letters = oldPointStructure[8];
130-
// console.log("Letters with score '8':", letters);
131-
// console.log("2nd letter within the key '8' array:", letters[1]);
132-
133124
function runProgram() {
134125
let wordInput = initialPrompt();
135126
let scorerFunction = scorerPrompt();
136127
let score = scorerFunction(wordInput);
137-
let transformOldToNew = transform(oldPointStructure);
128+
transform(oldPointStructure);
138129
console.log(`Score for '${wordInput}': ${score}`);
139-
140130
}
141131

142132
// Don't write any code below this line //

0 commit comments

Comments
 (0)