13
I've just spent 3 hours debugging a bit of code only to find it was caused by me assuming that the execution order of the following code was linear:-
$.ajax( {ajax options} );
console.log('I was assuming this would execute once the ajax request was complete');
This isn't the first time that this has caused me problems and I was just wondering what the reason for this behavior was?
Is it so that any ajax requests don't hold up other script execution that may be unrelated to the ajax request?