Skip to main content

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

Published 1 min readMarkdown
Part of seriesNode
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

About the author

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

No comments yet. Be the first to comment.

More from this blog