Skip to content

Commit 6fcbfc7

Browse files
committed
changed variable declaration
1 parent 3ef2c65 commit 6fcbfc7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sprint-3/alarmclock/alarmclock.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ function setAlarm() {
3535
//add color changing background when alarm reaches 0 until stopped.
3636
//function from color changing assignment 10 year ago!
3737
function makeRandomColor() {
38-
var colorOptions = "0123456789ABCDEF";
39-
var newColor = "#";
38+
let colorOptions = "0123456789ABCDEF";
39+
let newColor = "#";
4040
//repeat 6 times to generate 6 random hex digits from the 16 characters in colorOptions
41-
for (var i = 0; i < 6; i++) {
41+
for (let i = 0; i < 6; i++) {
4242
//picks random numbers from colorOptions and appends it to the # to make a new color.
4343
newColor += colorOptions[Math.floor(Math.random() * 16)];
4444
}

0 commit comments

Comments
 (0)