Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion Sprint-3/alarmclock/alarmclock.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
function setAlarm() {}
function setAlarm() {
const userInput = document.querySelector("#alarmSet").value;
let timeRemaining = userInput;

const myInterval = setInterval(function () {
timeRemaining -= 1;
const charactersLeftP = document.querySelector("#timeRemaining");
charactersLeftP.innerText = `Time Remaining ${timeRemaining}`;

if (timeRemaining === 0) {
playAlarm();
clearInterval(myInterval);
}
}, 1000);
}

// DO NOT EDIT BELOW HERE

Expand Down
4 changes: 2 additions & 2 deletions Sprint-3/quote-generator/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Title here</title>
<title>Quote generator app</title>
<script defer src="quotes.js"></script>
</head>
<body>
Expand Down
Loading