+ 2
Pause setInterval
Please How to pause setInterval please help me with the code https://code.sololearn.com/W3g8KxEp7tV3/?ref=app
3 Réponses
+ 2
Ibrahim Yusuf
You'll have to store the interval timestamp in a variable and use it to clear the interval. Then when play() is clicked you should create a new interval.
var interval = setInterval (time,200);
clearInterval(interval);
+ 4
Kevin ★ thanks, let me work on that
+ 4
Kevin ★ Thank you, I've gotten it.
check out the code
https://code.sololearn.com/W3g8KxEp7tV3/?ref=app