JavaScript refuses to run the code below. Which statement correctly describes the problem?
const orders = [120, 450, 9000, 300];
orders.forEach((amount) => {
if (amount > 5000) break;
console.log("Processing", amount);
});
The callback is a separate function, not a loop body ("Illegal break statement"). for (const amount of orders) { if (amount > 5000) break; … } stops correctly.