Hint
Pyramid of doom — nested callbacks; solve with Promises/async-await
Deeply nested callbacks make code hard to read, debug, and maintain.
// ❌ Callback hell
getUser(id, (user) => {
getPosts(user, (posts) => {
getComments(posts[0], (comments) => { ... });
});
});
// ✅ Async/await
const user = await getUser(id);
const posts = await getPosts(user);
const comments = await getComments(posts[0]);