Skip to content

Instantly share code, notes, and snippets.

@fnobi
Created August 14, 2013 07:04
Show Gist options
  • Save fnobi/6228641 to your computer and use it in GitHub Desktop.
Save fnobi/6228641 to your computer and use it in GitHub Desktop.
asyncって案外すぐ書ける ref: http://qiita.com/fnobi/items/1710ac3259246da44697
// 簡易な非同期処理
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