Skip to content

Instantly share code, notes, and snippets.

@Eli-Goldberg
Created March 29, 2017 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Eli-Goldberg/03ca4357110e60c6d5c7f9dbb69d8cf3 to your computer and use it in GitHub Desktop.
Save Eli-Goldberg/03ca4357110e60c6d5c7f9dbb69d8cf3 to your computer and use it in GitHub Desktop.
Callback hell
function one() {
setTimeout(function() {
console.log('1. First thing setting up second thing');
setTimeout(function() {
console.log('2. Second thing setting up third thing');
setTimeout(function() {
console.log('3. Third thing setting up fourth thing');
setTimeout(function() {
console.log('4. Fourth thing');
}, 2000);
}, 2000);
}, 2000);
}, 2000);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment