I have a function, where I define lots of setTimeout() functions . When user presses the button, it's starting the execution.
How can I cancel it ?
Is there any way to cancel ALL timeouts (assuming that I have multiple without the name)
// start timer
var timer = setTimeout(...);
// cancel timer
clearTimeout(timer);
See https://developer.mozilla.org/en-US/docs/DOM/window.clearTimeout