The Countdown Clock #18
Answered
by
mitchiemt11
meviru
asked this question in
Galaxy Trivia
-
Your code wants to count down from 10 to 1 with a dramatic one-second pause between each number. How can it put on this suspenseful show using JavaScript? |
Beta Was this translation helpful? Give feedback.
Answered by
mitchiemt11
Jul 19, 2024
Replies: 2 comments 2 replies
-
use timeout |
Beta Was this translation helpful? Give feedback.
1 reply
-
I'd use |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
meviru
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'd use
setInterval
to decrement and log the countdown value every 1000 milliseconds, clearing the interval when it reaches 0.