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.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Keshav Gautam
Keshav Gautam

No responses yet

Write a response