Created
December 27, 2014 08:00
-
-
Save Havvy/dbc20c0d4a37b53d3df4 to your computer and use it in GitHub Desktop.
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
| var forEachDelayed = function recur (array, fn, delay, ix) { | |
| ix = (typeof ix === "number") ? ix : 0; | |
| fn(array[ix], ix, array); | |
| if (ix === array.length - 1) { return; } | |
| setTimeout(function () { | |
| recur(array, fn, delay, ix + 1); | |
| }, delay); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment