Created
March 29, 2017 13:53
-
-
Save Eli-Goldberg/03ca4357110e60c6d5c7f9dbb69d8cf3 to your computer and use it in GitHub Desktop.
Callback hell
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 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