Created
August 27, 2014 23:23
-
-
Save Ginden/8fb8069d11c6798c204a to your computer and use it in GitHub Desktop.
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 arr = [1,2,3,4] | |
(function ajax(arr){ | |
if(!arr.length) return; | |
var tmp = arr.shift(); | |
setTimeout(ajax, 1000, arr); | |
console.log('wykonuje ajaxa '+tmp); | |
})(arr); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment