how to break out from settimeout javascript code example
Example: break loop timeout javascript
var keepCalling = true;
setTimeout(function () {
keepCalling = false;
}, 10000);
while ( keepCalling ) {
// do something
}
var keepCalling = true;
setTimeout(function () {
keepCalling = false;
}, 10000);
while ( keepCalling ) {
// do something
}