Let me explain. I want that my program do the following:
1º Ask the user to enter a value of time in seconds 2º Start a countdown from the value that the user has finishedand show him 3º when it finishes, it alerts the user that the time has finished.
This is my code so far (I do not know how to do it, I have tried many times), I did it with prompt and alert but maybe using html there is a solution
let counter= prompt("Please, select in how much time (in seconds) do you want me to alert you")
{
SetTimeOut(() =>
{
(console.log("Alert: you have completed your time"), counter)
})
}
while (setTimeout>0)
{
alert("your time finishes in: "+ counter + "seconds")
}