Design Patterns · Junior · Question 42 of 75

What is callback hell, and how is it avoided?

Explanation

A "pyramid" of nested callbacks is hard to read and to handle errors in. Promises flatten the chain, and async/await makes async code look synchronous.

Further reading

Problem with a question

Design Patterns · Junior · question 42

Test yourself

Take the Design Patterns · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz