Skip to content

Commit 0058792

Browse files
authored
Add spaces after control flow statements.
Adding spaces.
1 parent 3bb8923 commit 0058792

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

javascript/2038-remove-colored-pieces-if-both-neighbors-are-the-same-color.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ var winnerOfGame = function(colors) {
1111
let bScore = 0;
1212

1313
const canRemove = (index) => {
14-
if(colors[index] === colors[index-1] && colors[index] === colors[index+1]) return colors[index];
14+
if (colors[index] === colors[index-1] && colors[index] === colors[index+1]) return colors[index];
1515
return false;
1616
}
1717

18-
for(let i = 1; i < colors.length; i++) {
19-
if(canRemove(i) === 'A') aScore++;
20-
if(canRemove(i) === 'B') bScore++;
18+
for (let i = 1; i < colors.length; i++) {
19+
if (canRemove(i) === 'A') aScore++;
20+
if (canRemove(i) === 'B') bScore++;
2121
}
2222

2323
return aScore - bScore > 0;

0 commit comments

Comments
 (0)