How to call multiple promises?



How to call multiple promises?..

Answer / Aakash Bajpai

You can call multiple promises in Node.js by using Promise.all(promisesArray) which returns a new promise that resolves with an array of the resolved values from each promise, in the same order they were passed. Alternatively, you can use async/await syntax to handle multiple promises sequentially or concurrently within a function.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Node.js Interview Questions

Is rails still relevant 2019?

1 Answers  


How to generate unique uuids/ guid in node js?

1 Answers  


What are some of the most popular modules of Node.js?

1 Answers  


Can you run node.js on apache?

1 Answers  


What is the difference between reactjs and nodejs?

1 Answers  


What is the difference between nodejs and expressjs?

1 Answers  


Where can we use node.js?

1 Answers  


Explain the process to implement test pyramid in terms of http apis.

1 Answers  


What is the difference between module.exports and exports in node.js?

1 Answers  


What is the difference between setimmediate() and settimeout()?

1 Answers  


Explain the difference between readfile and createreadstream in node js?

1 Answers  


How does node.js support multi-processor platforms, and does it fully utilize all processor resources?

1 Answers  


Categories