A Countdown Timer with reset functionality in pure Javascript This works for me, but is this the right way to create this timer?
I might be naive about this but I think this is close to perfect in pure JS.
What would be the drawbacks of using this Timer compared to creating it in a different way?

Click start and the timer starts to countdown.
Click reset and the timer resets back to the starting time.

HTML:
&lt;button onclick='startStopTimer()'&gt;Start&lt;/button&gt;
&lt;button onclick='startStopTimer()'&gt;Reset&lt;/button&gt;
&lt;h1&gt;00:10&lt;/h1&gt;

JavaScript:
console.clear()
let timer = document.querySelector('h1')
let startingTime = 9
let startTimer;
let startStopTimer = () =&gt; {
  if(startTimer){
    clearInterval(startTimer);
    timer.innerHTML = '00:10'
    startingTime = 9
    return startTimer = undefined
  }else{
    return startTimer = setInterval(()=&gt;{
      timer.innerHTML = `00:0${startingTime--}`
    }, 1000)
  }
}
From a short review;

You use 9 twice, this should be assigned to a nicely named global constant
You hard code both 9 and 00:10, this is not flexible. I would expect to be able to change 9 to 99 and to have the timer start at 01:40
Similarly, 00:0${startingTime--} does not allow for much flexibility in the script
The browser tries to honor the 1000, but it cannot be trusted. You are supposed to keep track of the original start and deduct that from current time to determine how much time has passed. Otherwise the timer is not reliable.
Placing the timer in a h1 element is probably not a good idea semantically
Your entire code should be in a well named (self executing) function
I am not sure why you return anything in startStopTimer? If you are never using the returned value, then just drop the return keyword
since clearInterval returns undefined and because it makes sense, I would go for startTimer = clearInterval(startTimer);
Why console.clear()? Production code should avoid console