for (const item of array) {
await processImage(image, name)
}
Внутри цикла не работает setTimeout
(async () => {
const data = [ 1, 2, 3, 4, 5 ];
for (const n of data) {
console.log(n);
await new Promise(r => setTimeout(r, 1000));
}
})();