Less indentation

suggest change

With promises:

function doTheThing() {
    return doOneThing()
        .then(doAnother)
        .then(doSomeMore)
        .catch(handleErrors)
}

With async functions:

async function doTheThing() {
    try {
        const one = await doOneThing();
        const another = await doAnother(one);
        return await doSomeMore(another);
    } catch (err) {
        handleErrors(err);
    }
}

Note how the return is at the bottom, and not at the top, and you use the languageā€™s native error-handling mechanics (try/catch).

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents