Skip to content

Instantly share code, notes, and snippets.

@westonplatter
Last active August 29, 2015 14:09
Show Gist options
  • Select an option

  • Save westonplatter/781fa3070323c412dd77 to your computer and use it in GitHub Desktop.

Select an option

Save westonplatter/781fa3070323c412dd77 to your computer and use it in GitHub Desktop.
//
// 1. what is the resulting console.log() output?
//
// 2. why did the console.log output in the order it did?
var first = function(){
$.get("/", {
complete: function(){
console.log("first");
}
});
$.ajaxSetup({
complete: function(){
console.log("second");
}
});
};
first();
$.get("/", {
complete: function(){
console.log("third");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment