Promise resolve example

javascript promises
(async () => {
  const promises = [];
  promises.push(new Promise((resolve) => {
    resolve(1);
  }));
  promises.push(new Promise((resolve) => {
    resolve(2);
  }));
  const results = await Promise.all(promises);
  console.log(results);
})();