28
ho bisogno di uscire da un intervallo di esecuzione se le condizioni sono corrette:Come uscire da setInterval
var refreshId = setInterval(function() {
var properID = CheckReload();
if (properID > 0) {
<--- exit from the loop--->
}
}, 10000);
Come fare 'clearInterval' dal di fuori del ciclo? – TharinduLucky
chiama semplicemente 'clearInterval (intervalName)', ad esempio: 'var helloEverySecond = setInterval (function() {console.log (" ciao ");}, 1000);' può essere fermato da 'clearInterval (helloEverySecond);' –