Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Neat way to force setInterval into running the function at start and every two seconds after that
var interv = setInterval((function() {
console.log('DING DING DING');
return arguments.callee;
})(), 2000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment