Available question text
Implement a polyfill for Array.prototype.forEach that iterates an array in order and invokes a provided callback for each present element with arguments (element, index, array) using an optional thisArg. It should mimic native behavior: no return value, skip holes in sparse arrays, and throw if the callback is not a function.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2804. Array Prototype ForEach
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source