1const promise1 = Promise.resolve(3);
2const promise2 = 42;
3const promise3 = new Promise((resolve, reject) => {
4 setTimeout(resolve, 100, 'foo');
5});
6
7Promise.all([promise1, promise2, promise3]).then((values) => {
8 console.log(values);
9});
10// expected output: Array [3, 42, "foo"]
11