Skip to content

Instantly share code, notes, and snippets.

@AndrewIngram
Created April 26, 2013 15:50
Show Gist options
  • Save AndrewIngram/5468285 to your computer and use it in GitHub Desktop.
Save AndrewIngram/5468285 to your computer and use it in GitHub Desktop.
Almost everything about this is wrong
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