Skip to content

Callbacks

A callback is a function passed as an argument to another function to be executed later. Callbacks were the original async pattern in JavaScript.

  • Understand callback functions and their role in async programming
  • Recognize callback hell and its problems
  • Master the error-first callback pattern

Callbacks are the foundation of all async patterns in JavaScript. While they work for simple cases, they lead to callback hell for complex sequences — which Promises solve.