Globant Interview Question

What is callback hell and how can it be avoided?

Interview Answer

Anonymous

Jun 1, 2016

Callback hell refers to the situations where you have an insane amount of nested callbacks. This results in code that is hard to read and maintain. I can be avoided by using Promises instead of callbacks. You can also modularize your code and break up your callbacks into independent functions.