Skip to content

Commit a73eb3b

Browse files
committed
use const for constants rather than arbitary declarations
1 parent f733d29 commit a73eb3b

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

example.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ var chooseOption = (indexedArray) => {
33
return indexedArray[randomIndex];
44
}
55

6-
ROCK = "rock";
7-
PAPER = "paper";
8-
SCISSORS = "scissors";
6+
const ROCK = "rock";
7+
const PAPER = "paper";
8+
const SCISSORS = "scissors";
99

10-
var options = new Set([ ROCK, PAPER, SCISSORS ]);
10+
const options = new Set([ ROCK, PAPER, SCISSORS ]);
1111

1212
class RockPaperScissors extends TextGame {
1313

@@ -73,4 +73,4 @@ class RockPaperScissors extends TextGame {
7373
}
7474
}
7575
}
76-
game = new RockPaperScissors(document.body);
76+
const game = new RockPaperScissors(document.body);

0 commit comments

Comments
 (0)