What is a callback in nodeJs?

Keshav Gautam
May 22, 2021

The callback is an asynchronous equivalent for a function.

The callback function is being called at the completion of a given task.

There are two types of code

A blocking code

The blocking code is the which halts the program execution till its own instruction gets completed.

A Nonblocking code

The Nonblocking code is the which does not halt the program execution till its own instruction gets completed.

--

--