Callback hell là khi nhiều callbacks lồng nhau tạo code hình kim tự tháp, khó đọc và maintain — ví dụ: getUser(id, (user) => getPosts(user, (posts) => getComments(posts[0], (comments) => ...))).
Dễ xảy ra khi xử lý nhiều tác vụ async phụ thuộc nhau theo kiểu cũ. Giải pháp theo thứ tự ưu tiên: dùng async/await (rõ nhất), Promise chaining, hoặc named functions thay anonymous callbacks. Trong dự án thực tế, async/await là tiêu chuẩn hiện đại và nên dùng mặc định.
Callback hell is when multiple nested callbacks create pyramid-shaped code that is hard to read and maintain — for example: getUser(id, (user) => getPosts(user, (posts) => getComments(posts[0], (comments) => ...))).
It occurs when handling many sequential async tasks in the old style. Solutions in order of preference: use async/await (clearest), Promise chaining, or named functions instead of anonymous callbacks. In real projects, async/await is the modern standard and should be the default.