Created
March 6, 2016 04:07
-
-
Save bitchwhocodes/08756687c339f24360c0 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 items = [1,2,3,4]; | |
var arrayCounter = -1; | |
function getFace(i) | |
{ | |
// ajax call | |
//when done call | |
// getFaceComplete() | |
} | |
function getFaceComplete(){ | |
arrayCounter++; | |
// if there is anything in the array// | |
// doItem() | |
} | |
function doItem(){ | |
var item = items[arrayCounter]; | |
getFace(item); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment