A not-so-long time ago, JavaScript was renowned for a thing called callback hell
. I should know, I've written projects which would have nested levels of
callbacks. For example:
function saveWebPage(url, callback) {
// Get the web page
getWebPage(url, function(err, html) {
if (err) callback(err);
// Load it if