Last active
August 29, 2015 14:09
-
-
Save westonplatter/781fa3070323c412dd77 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // | |
| // 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