Q5: What is an error-first callback in Node.js?

An error-first callback passes an error object as its first parameter. If no error occurred, the first parameter is null or undefined.

Key Takeaways
  • First argument is reserved for errors: (err, result) => {}.
  • Standard convention in traditional asynchronous Node.js APIs.
Knowledge Check

In error-first callbacks, what is the value of the error parameter when execution succeeds?