Simply Explained
Javascript Callback Hell: Simply Explained
While working with Javascript, you must have heard of the infamous callback hell. However, for people who just started learning Javascript, they are often confused about what “callback hell” really means.
In this article, I would explain to you exactly what “callback hell” is with an example. Let’s get started!
Before we begin
To understand “callback hell”, you would definitely need to understand what a “callback function” is. If you are unsure, read the article below before continuing:
Now that is out of the way, let’s get started with “callback hell”
Callback hell refers to the situation where callbacks are nested within other callbacks several levels deep, potentially making it difficult to understand and maintain the code.
Let’s cook some beef with callbacks
To explain callback hell, let’s try to implement a simple and trivial scenario of a beef cooking process.