Callback vs Promise vs Async/Await — What's the Difference?
All three handle asynchronous operations in JavaScript, but represent an evolution: callbacks are plain functions passed to be called later, Promises are obj...
Published November 22, 2026
Callbacks, Promises and async/await are three ways to handle asynchronous results in JavaScript. Callbacks are the original pattern, Promises chain results and errors cleanly, and async/await makes Promise code read like synchronous code.
The concept
A callback is a function passed in to be called later; nesting them leads to 'callback hell' and scattered error handling.
A Promise represents a future value with then/catch; async/await is syntax over Promises that lets you write try/catch and loops naturally.
Same task, three styles
Practical examples
Callback
fs.readFile('a.txt', 'utf8', (err, data) => {
if (err) return console.error(err)
console.log(data)
})Promise
fs.promises.readFile('a.txt', 'utf8').then(console.log).catch(console.error)async/await
try { console.log(await fs.promises.readFile('a.txt', 'utf8')) } catch (e) { console.error(e) }Promisify a callback API
import { promisify } from 'util'
const read = promisify(fs.readFile)Common mistakes
- Mixing callbacks and promises in one function.
- Forgetting to return promises in then chains.
- Not handling rejections.
Key takeaways
- Callbacks → Promises → async/await.
- Prefer async/await for readability.
- Always handle errors.
FAQ
Are callbacks obsolete?
Still used for events and simple APIs, but Promises are standard for async results.
Does await block?
It pauses the function, not the thread.