Created
January 11, 2013 22:08
-
-
Save akumpf/4514374 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
(function(){ | |
var i = 0; | |
function forloop1(){ | |
if(i<10){ | |
(function(){ | |
var j = 0; | |
function forloop2(){ | |
if(j<10){ | |
console.log(i,j); | |
j++; | |
setTimeout(forloop2, 0); | |
}else{ | |
i++; | |
setTimeout(forloop1, 0); | |
} | |
} | |
forloop2(); | |
})(); | |
}else{ | |
console.log("all done"); | |
} | |
} | |
forloop1(0); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment