Skip to content

Instantly share code, notes, and snippets.

@trikitrok
Forked from jboner/lostincallbackhell.js
Created June 30, 2024 13:45
Show Gist options
  • Save trikitrok/6d83606a58db7645f842c0897ebab313 to your computer and use it in GitHub Desktop.
Save trikitrok/6d83606a58db7645f842c0897ebab313 to your computer and use it in GitHub Desktop.
Lost In Callback Hell
lost(arg, function(err, result) {
if(err) return console.log(err);
In(result, function(err, result) {
if(err) return console.log(err);
callback(result, function(err, result) {
if(err) return console.log(err);
hell(result);
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment