/** * Initiate 3 variables (seconds, tens, interval) * Give a starting value of 0 for seconds and tens * Use the appropriate variable type for each */ /** * Get the DOM elements for the stopwatch and save them in variables * Use the appropriate variable type for each * * Hint: There are 3 buttons and 2 numbers to manipulate */ /** * Create a function, which is waiting for the user to press the 'Start' button. * When pressed, set the timer run `runStopwatch` function every 10ms. */ buttonStart.onclick = () => {} /** * Create a function, which is waiting for the user to press the 'Stop' button. * When pressed, clear the interval. */ buttonStop.onclick = () => {} /** * Create a function, which is waiting for the user to press the 'Reset' button. * When pressed, clear the interval, reset the seconds and tens to 0. * * Hint: Don't forget to concatenate a leading '0'. */ buttonReset.onclick = () => {} /** * Build the `runStopwatch` function. */ const runStopwatch = () => { // Increment the tens. /** * Display updated tens and seconds. * Make sure, that the tens and seconds are always two digits long. * * Hint: there are 4 cases you need to handle every time the function runs. */ }