Skip to content

Instantly share code, notes, and snippets.

@ilearnjavascript
Created March 27, 2019 23:47
Show Gist options
  • Save ilearnjavascript/6967a814aa877a42f2cb3478a1288be8 to your computer and use it in GitHub Desktop.
Save ilearnjavascript/6967a814aa877a42f2cb3478a1288be8 to your computer and use it in GitHub Desktop.
es8 - async await - 3.js
function callback() {
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 setting up fifth thing');
setTimeout(function () {
console.log('5. Fifth thing');
setTimeout(function () {
console.log('End');
}, 0);
}, 1000);
}, 1000);
}, 1000);
}, 1000);
}, 1000);
}
callback();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment