title: why my timer in POO doesn't work ? (javascript)
body: <p>I created a timer in procedural which works ....</p>
  
  <pre><code>```let startMinutes = 1;
  let time = startMinutes * 60;
  let btnTimer = document.getElementById('btn-signer');
  const countdownElt = document.getElementById('countdown');
  let interval = setInterval(updateCountDown, 1000);
  
  function startTimer() {
  
    interval = setInterval(updateCountDown, 1000);
  }
  btnTimer.addEventListener("click", function () {
    startTimer()
  });
  
  function updateCountDown() {
    const minutes = Math.floor(time / 60); //nombre entier
    let seconds = time % 60; //reste division
  
    seconds = seconds &lt; 10 ? '0' + seconds : seconds;
  
    countdownElt.innerHTML = `Temps restant : ${minutes}min ${seconds}sec`;
  
    time--;
  
    if (minutes &lt;= 0 &amp;&amp; seconds &lt;= 0) {
      clearInterval(interval);
      countdownElt.innerHTML = "Temps écoulé, veuillez réserver à nouveau.";```
  </code></pre>
  
  <p>I have to transform it in POO but it doesn't works, I thank that maybe I need to create parameters in consctructor but I don't know if it's really necessary and I don't know which parameters to use..</p>
  
  <pre><code>``` class countDown {
    constructor() {
      this.btnTimer = document.getElementById('btn-signer');
      this.countdownElt = document.getElementById('countdown');
      this.startMinutes = 1;
      this.timeSec = this.startMinutes * 60;
  
      this.interval = setInterval(this.updateCountDown, 1000);
      this.btnTimer.addEventListener('click', () =&gt; this.startTimer());
      this.updateCountDown();
    }
  
    startTimer() {
  
      this.interval = setInterval(this.updateCountDown, 1000);
      //console.log(this.interval);
    }
  
    updateCountDown() {
      let minutes = Math.floor(this.timeSec / 60); //nombre entier
      let seconds = this.timeSec % 60; //reste division
  
      seconds = seconds &lt; 10 ? '0' + seconds : seconds;
  
      document.getElementById('countdown').innerHTML = `Temps restant : ${minutes}min ${seconds}sec`;
  
      this.timeSec--;
  
      if (minutes &lt;= 0 &amp;&amp; seconds &lt;= 0) {
        clearInterval(this.interval);
        this.countdownElt.innerHTML = "Temps écoulé, veuillez réserver à nouveau.";
      }
    }
  }```
  </code></pre>
  
  <p>Thanks.</p>