Last active
August 4, 2017 08:14
-
-
Save s-ashwinkumar/f279489e6ffaa2145edc48d6b58bb8fa to your computer and use it in GitHub Desktop.
Sample code to demostrate async basics
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
function getStuff() { | |
var result; | |
jQuery.get("amazing/long/method"), function(response) { | |
result = response; | |
} | |
return result; | |
} | |
var stuff = getStuff(); | |
console.log("This is THE stuff - "+ stuff); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment