Clearing an Interval in Javascript


Use clearInterval to stop future invocations of setInterval.

Source Code

let intervalId = setInterval(() => console.log('Hello'), 1000);
clearInterval(intervalId);
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments