Skip to content

Instantly share code, notes, and snippets.

@dieseltravis
Forked from remy/gist:360113
Created April 8, 2010 14:40
Show Gist options
  • Save dieseltravis/360131 to your computer and use it in GitHub Desktop.
Save dieseltravis/360131 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