The only negative value printed by your code is
-1
. That's because you're subtracting three second intervals from
56
, which is not divisible by
3
.
Once your code hits
-1
, the timer stops.
If you want to avoid printing
-1
, change your termination check to:
if (timeLeft < n)
clearInterval(Timer);