Clearing a Timeout with clearTimeout in Javascript


Cancel a timeout set with setTimeout using clearTimeout.

Source Code

let timerId = setTimeout(() => console.log("This won't run."), 1000);
clearTimeout(timerId);
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments