Stopwatch

Languages

Build a stopwatch widget which can measure how much time has passed. It shows the current timer and has two buttons underneath: "Start/Stop" and "Reset".

Requirements

  • Start/Stop Button: Starts/stops the timer depending on whether the timer is running.
  • Reset: Resets the timer to 0 and stops the timer.
  • The timer shows the number of seconds elapsed, down to the millisecond.
    • Clicking on the timer should start/stop the timer. The Start/Stop button's label should update accordingly as well.
    • It'd be a nice optional addition to format the time to display in hh:mm:ss:ms format.

You are free to exercise your creativity to style the appearance of the stopwatch. You can try out Google's stopwatch widget for inspiration and an example.

Asked at these companies

Premium FeaturePurchase premium to see companies which ask this question.
View plans
The TypeScript Denial Tee — TypeScript love, "any" denialSponsor: SwagOverflow
The TypeScript Denial Tee — TypeScript love, "any" denial

You swear by TypeScript, but we all know what's lurking in your code. This black tee perfectly captures the silent shame of every front end dev who totally loves strict typing — until any saves the day. Clean, witty, and painfully relatable, it's the ultimate uniform for TypeScript warriors in denial.

Get yours now ->

The TypeScript Denial Tee — TypeScript love, "any" denialSponsor: SwagOverflow
The TypeScript Denial Tee — TypeScript love, "any" denial

You swear by TypeScript, but we all know what's lurking in your code. This black tee perfectly captures the silent shame of every front end dev who totally loves strict typing — until any saves the day. Clean, witty, and painfully relatable, it's the ultimate uniform for TypeScript warriors in denial.

Get yours now ->