Does the setTimeout function clear/destroy itself when done, or do I need to manually call clearTimeout within the callback?
2 Answers
Yes it clears itself automatically when the timeout finishes and the function is fired.
The manual clearing is used to stop the countdown from finishing and the callback from firing. It has no function in the callback since the timeout is already cleared.
1 Comment
abs
You dont have to do cleartimeout, It is used to stop timer