MCPcopy Index your code
hub / github.com/nodejs/node / forEach

Function forEach

test/fixtures/snapshot/typescript.js:374–384  ·  view source on GitHub ↗

* Iterates through 'array' by index and performs the callback on each element of array until the callback * returns a truthy value, then returns that value. * If no such value is found, the callback is applied to each element of array and undefined is returned.

(array, callback)

Source from the content-addressed store, hash-verified

372 * If no such value is found, the callback is applied to each element of array and undefined is returned.
373 */
374 function forEach(array, callback) {
375 if (array) {
376 for (var i = 0; i < array.length; i++) {
377 var result = callback(array[i], i);
378 if (result) {
379 return result;
380 }
381 }
382 }
383 return undefined;
384 }
385 ts.forEach = forEach;
386 /**
387 * Like `forEach`, but iterates in reverse order.

Callers

nothing calls this directly

Calls 1

callbackFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…