Button for starting a timer in JavaScript

In the previous lessons, our timer started its work as soon as the page loaded. Let's now make a button, by clicking on which our timer will start:

html<button id="start">start</button>

Let's write the appropriate JavaScript:

javascriptlet start = document.querySelector('#start');

start.addEventListener('click', function() {
  let i = 0;
  
  setInterval(function() {
    console.log(++i);
  }, 1000);
});
Задание 1

Make a button, by clicking on which a countdown will be displayed in the console, starting from 100.