Skip to content

Instantly share code, notes, and snippets.

@ovaillancourt
Created July 31, 2012 13:10
Show Gist options
  • Save ovaillancourt/3216937 to your computer and use it in GitHub Desktop.
Save ovaillancourt/3216937 to your computer and use it in GitHub Desktop.
function runAfter(times, func) {
if (times <= 0) return func();
return function() {
if (--times < 1) { return func.apply(this, arguments); }
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment