Created
April 26, 2013 15:50
-
-
Save AndrewIngram/5468285 to your computer and use it in GitHub Desktop.
Almost everything about this is wrong
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
Javascript gives us an option to do things a bit differently. Rather than wait around for a function to finish by returning a value, we can use callbacks to do it asynchronously. This is useful for things that take a while to finish, like making an AJAX request, because we aren’t holding up the browser. We can keep on doing other things while waiting for the callback to be called. In fact, very often we are required (or, rather, strongly encouraged) to do things asynchronously in Javascript. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment