@@ -33,11 +33,11 @@ function setAlarm() {
3333 } , 1000 ) ;
3434}
3535//add color changing background when alarm reaches 0 until stopped.
36- //function from color changing assignment 10 year ago!
36+ //function from color changing assignment 10 year ago!
3737function makeRandomColor ( ) {
38- var colorOptions = ' 0123456789ABCDEF' ;
39- var newColor = '#' ;
40- //repeat 6 times to generate 6 random hex digits from the 16 characters in colorOptions
38+ var colorOptions = " 0123456789ABCDEF" ;
39+ var newColor = "#" ;
40+ //repeat 6 times to generate 6 random hex digits from the 16 characters in colorOptions
4141 for ( var 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 ) ] ;
@@ -51,11 +51,11 @@ function makeRandomColor() {
5151document . body . style . transition = "background-color 0.7s ease" ;
5252// call the entire page
5353window . addEventListener ( "load" , function ( ) {
54- // attach the alarm sound to the make Random color so it starts changing when the alarm starts.
54+ // attach the alarm sound to the make Random color so it starts changing when the alarm starts.
5555 audio . addEventListener ( "play" , ( ) => {
56- // stops any previous color changing intervals
56+ // stops any previous color changing intervals
5757 clearInterval ( colorInterval ) ;
58- //starts a new repeating timer and saves it's ID in colorInterval. setInterval runs every 2seconds
58+ //starts a new repeating timer and saves it's ID in colorInterval. setInterval runs every 2seconds
5959 colorInterval = setInterval ( ( ) => {
6060 //style the background and make it important! so it over-rides the style.css
6161 document . body . style . setProperty (
@@ -74,7 +74,7 @@ window.addEventListener("load", function () {
7474} ) ;
7575//not sure that this is helping. The function works without it.
7676window . setAlarm = setAlarm ;
77- //end linking
77+ //end linking
7878
7979// DO NOT EDIT BELOW HERE
8080
0 commit comments