0 votes
in Node.js by
What are Promises in node.js?

1 Answer

0 votes
by (1.7k points)
Promises are the concurrency primitive. Promises are the part of most modern programming languages to make programming life easier. Promises can help us to handle async operations in better way.

Example:- Following code 1000ms prints out the result string in standard output.

new Promise((resolve, reject) => {
  setTimeout(() => {
  }, 1000)

Share:- Whatsapp Facebook Facebook

Welcome to Developerhelpway Q&A, where you can ask questions and receive answers from other members of the community.