Skip to main content
CodeOath
← All challenges

Challenge

Countdown Timer

Medium
  • javascript

Build a countdown timer that counts down from a set number of seconds, such as 60, and shows the time as MM:SS. It ticks down once a second and stops at 00:00.

Notes:

  • The starter's <p id="timer"> already reads 01:00. Update its text on every tick.
  • Both parts are always two digits, so five seconds reads 00:05.

Check your work against

  • Displays time in MM:SS format
  • Counts down automatically once per second after the page loads
  • Stops exactly at 00:00 — never goes negative

No automatic grading

Check your work against the list above, then compare it with the solution preview.

Tab indents. Press Esc, then Tab to leave the editor.

Live preview

Starter loaded. The preview updates as you type.