Question from the Node.js test

How to get the result of 3 asynchronous functions in NodeJS

Hard

Considering the 3 following asynchronous functions:

function getTweets() {
  return new Promise((resolve) => setTimeout(resolve, 2000, "tweets"));
}

function getFacebookPosts() {
  return new Promise((resolve) => setTimeout(resolve, 1000, "posts"));
}

function getPinterests() {
  return new Promise((resolve) => setTimeout(resolve, 1500, "pin’s"));
}

What will be the result of the following code?

Promise.all([
  getTweets(),
  getFacebookPosts(),
  getPinterests()
])
.then(console.log);
Author: Jean-marie CléryStatus: PublishedQuestion passed 918 times
Edit
2
Community EvaluationsNo one has reviewed this question yet, be the first!