Skip to content

Commit dbc914a

Browse files
committed
format code
1 parent 9ddf206 commit dbc914a

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Sprint-3/alarmclock/alarmclock.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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!
3737
function 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() {
5151
document.body.style.transition = "background-color 0.7s ease";
5252
// call the entire page
5353
window.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.
7676
window.setAlarm = setAlarm;
77-
//end linking
77+
//end linking
7878

7979
// DO NOT EDIT BELOW HERE
8080

Sprint-3/alarmclock/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ button {
6767
}
6868

6969
#set:hover {
70-
background-color: #447f3d;
70+
background-color: #447f3d;
7171
transform: translateY(-1px);
7272
}
7373

0 commit comments

Comments
 (0)