Submit your email address and receive
article and product notifications. Your email is safe with us.
Resetting the timer funcitons in JavaScript
Here we will learn how to reset the timer function we have studied in part 1 of this tutorial. We can reset or clear the timer before the time out of the timer by using the function clearTimeout(). Here is the general syntax
clearTimeout(mytime)
mytime is the timer id we defined while activating the timer( please see the part 1 of this tutorial). It must be exactly same as one used in setTimeout function as it identify the timer with this.