I want to make some wine. And my function:
function wine(){
growGrapes();
process(grapes);
makeWine();
bottle();
}
However, since my functions often consist of a query $.ajax(), some other functions are executed first. I used the success tool, but it only helps with one ajax request.
success:function(result){
}
What I really want is a sequence. Literally, grapes are processed before they are grown. What is the easiest approach?
source
share