Last active
November 17, 2017 09:19
-
-
Save lacymorrow/1edfa0c3b18061b7ec079f2be212eed1 to your computer and use it in GitHub Desktop.
JS - Loop a function call using setTimeout()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doStuff() { return false; } | |
(function loopFunc() { | |
doStuff(); | |
//setTimeout(arguments.callee, 100); // callee is deprecated | |
setTimeout(loopFunc, 100); | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment