loading
index.js
1
2
3
4
5
6
const waitFor = (ms) => new Promise(r => setTimeout(r, ms));

[1, 2, 3].forEach(async (n) => {
  await waitFor(1000);
  console.log(`first number`, n);
});