you can use promise chain,just like this
```
const waitFor = (ms) => new Promise((r) => setTimeout(r, ms));
const start = () => {
let next = Promise.resolve();
for (const element of array) {
next = next.then(() => waitFor(1000)).then(() => console.log(element));
}
next.then(() => console.log('done'));
};
start();
```