What are callbacks? A beginner’s guide.

Chris Truong
Sep 19, 2019 · 4 min read

Callbacks is a word you will hear over and over again when you begin your JavaScript journey. You may have even seen it referenced in documentations like this:

or even in your IDE’s tool-tips like this:

A tool-tip when typing out the array.map function in VSCode.

So what exactly is a callback function and why is it used so often in JavaScript? Callback functions are the core of asynchronous code in Node.js development and allows…