Skip to content

Instantly share code, notes, and snippets.

@dshaw
Forked from remy/gist:360113
Created April 8, 2010 15:13
Show Gist options
  • Save dshaw/360166 to your computer and use it in GitHub Desktop.
Save dshaw/360166 to your computer and use it in GitHub Desktop.
setInterval((function () {
console.log(new Date()); // run some arbitrary code
return arguments.callee; // here be the magic
})(), 1000);
// ^---- and that runs the function, and the return val is assign to the interval
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment