Promissa says"Callback hell" is the deeply nested pyramid from sequencing many callbacks — promises fix it.
When step B needs A's result and C needs B's, nested callbacks form a rightward "pyramid of doom" that's hard to read and error-handle. Each level needs its own error check. Promises flatten this into a linear .then() chain, and async/await makes it read like synchronous code — which is why both exist.
Power-ups you unlock
Nested callbacks = pyramid of doom
Hard to read and error-handle
Each level needs its own error path
Promises/async-await flatten it
Race Condition Rex attacks — common mistakes
Sequencing with nesting instead of promises
Duplicated error handling per level
Losing track of which callback owns which error
Boss battleRecognize a 3-level nested-callback pyramid, then picture it as a flat .then() chain.
Example code
<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>stepA(a => {
stepB(a, b => {
stepC(b, c => { // ← the pyramid
done(c);
});
});
});
// promises flatten this into A.then(B).then(C)</pre></body></html>