Skip to content

Instantly share code, notes, and snippets.

@jackpordi
Created September 3, 2019 22:44
Show Gist options
  • Select an option

  • Save jackpordi/0f293703b2ed4e569bc50723f21f5787 to your computer and use it in GitHub Desktop.

Select an option

Save jackpordi/0f293703b2ed4e569bc50723f21f5787 to your computer and use it in GitHub Desktop.
function callbackHell() {
boilPot(() => {
addCarrots();
letPotKeepBoiling(
() => {
addOnions();
letPotKeepBoiling(
() => {
console.log("Your vegetable soup is ready!");
},
1000,
);
},
5000
)
},
5000,
chopCarrots(),
chopOnions(),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment