Array.forEach() does not await async functions.
This silently causes race conditions and partial execution.
// ❌ This does NOT wait
items.forEach(async item => {
await process(item);
});
// ✅ Correct
for (const item of items) {
await process(item);
}
Why this mattersforEach ignores promises. Errors get swallowed, execution order breaks.
