Callback

say it: “KAWL-bak” /ˈkɔːlbæk/

A function run when work finishes; Node's original style.

What is Callback?

A callback is a function passed to another to run when work finishes, the original Node style before promises.

fs.readFile('recipes.json', 'utf8', (err, text) => {
  if (err) return console.error(err);
  console.log(text);
});

Level: Journeyman · More Node.js terms at this level

Updated