The forEach method is more efficient than using a for loop to iterate over an array, because it avoids creating a new scope for each iteration.
The candidate's solution is correct. The forEach method is more efficient than a for loop because it avoids creating a new scope for each iteration.
Evaluated at: 2022-11-21 06:17:27