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

Function forEachRight

test/fixtures/snapshot/typescript.js:389–399  ·  view source on GitHub ↗

* Like `forEach`, but iterates in reverse order.

(array, callback)

Source from the content-addressed store, hash-verified

387 * Like `forEach`, but iterates in reverse order.
388 */
389 function forEachRight(array, callback) {
390 if (array) {
391 for (var i = array.length - 1; i >= 0; i--) {
392 var result = callback(array[i], i);
393 if (result) {
394 return result;
395 }
396 }
397 }
398 return undefined;
399 }
400 ts.forEachRight = forEachRight;
401 /** Like `forEach`, but suitable for use with numbers and strings (which may be falsy). */
402 function firstDefined(array, callback) {

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…