Day 4: Stopwatch

A simple stopwatch using setInterval(), clearInterval(), and time arithmetic.

00:00:00

Laps

    How it works (short)

    The script keeps an elapsed milliseconds counter. On Start it notes the start timestamp and uses setInterval() to update the display frequently. On Stop it clears the interval and accumulates elapsed time. Reset clears everything.