← HALL

Async ForEach Sequence Breakdown

HARD
+500 XP REWARD ⏱ Limit: 15m
// MISSION BRIEFING //

ANOMALY DESCRIPTION

A batch processor attempts to execute an async transform using array.forEach. But Array.prototype.forEach does not await promises! Refactor the method to use for...of or Promise.all.

SPECIFICATION SUITE

Async batch completion
Input: [1, 2], async x => x * 2
Expected: [2, 4]
Empty array handling [PROTECTED TEST]
Evaluation logic hidden to prevent hardcoding.

RADAR HINTS

Hint #1 (Click to decrypt)

Replace items.forEach with a for (const item of items) loop.

solution.js UTF-8 • JAVASCRIPT
STATIC ANALYSIS CONSOLE Ready for dispatch

Press "VERIFY & SUBMIT" or Ctrl+Enter to evaluate your patch.