Created
August 14, 2013 07:04
-
-
Save fnobi/6228641 to your computer and use it in GitHub Desktop.
asyncって案外すぐ書ける ref: http://qiita.com/fnobi/items/1710ac3259246da44697
This file contains 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 async = function (fns) { | |
(function exec (index) { | |
if (!fns[index]) { | |
return; | |
} | |
fns[index](function () { | |
exec(index + 1); | |
}); | |
})(0); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment