JS Run Until
var intervalId = setInterval(function () {
if (condition) {
return;
} else {
clearInterval(intervalId);
}
alert("I finished");
},1000);
Written by Erik Kronberg
Related protips
2 Responses
The last line is wrong ;)
over 1 year ago
·
Not anymore! Thanks!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Js
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#