Stop being the product.
Become the owner.
or
sign uplog in

How do I get the web page to show the alert when the…

How do I get the web page to show the alert when the scheduled time is met

I am building an alarm in HTML and JS and the issue is when the local time matches with the scheduled time it is not going off

What is the issue

I have the github link https://github.com/mikkimat81539/Coding-Challenge/blob/main/Alarm/main.js of the full code but I attached a snippet of the problem here

let counter = 1 // increment so I can add it to KEY in local storage

for (let i = 0; i < timeList.length; i++){
localStorage.setItem(`Time ${counter}`, timeList[i])

const getTime = localStorage.getItem(`Time ${counter}`)

// console.log("same?", getTime === localTime); // Check to see if there is a match

if (getTime === localTime) {
alert("RING RING RING")
localStorage.removeItem(`Time ${counter}`) // remove once condition is met
}

counter += 1

}
#programming #dev #technology
earnings
0 mlx total
$0  total
engagement
2 views
0 reactions

0 comments