Skip to main content

Command Palette

Search for a command to run...

How many types of API functions are there in Node.js?

Updated
1 min read
How many types of API functions are there in
Node.js?

There are two types of API functions in Node.js:

  • Asynchronous, non-blocking functions use the callback pattern, in which a callback function is passed as an argument to the function and is executed when the function completes.

  • Synchronous, blocking functions have a Sync suffix in their name, such as fs.readFileSync

More from this blog

R

Raja Muhammad Asher - Senior Software Engineer - Full Stack Developer

157 posts

Full Stack Developer with a passion for building web applications. PHP, Node.js, Laravel, ExpressJS, MySQL, MongoDB. Love collaborating & making a difference