-
Couldn't load subscription status.
- Fork 5
forEach
Subhajit Sahu edited this page May 3, 2023
·
14 revisions
Call a function for each value.
function forEach(x, fp)
// x: an array
// fp: process function (v, i, x)const xarray = require('extra-array');
var x = [1, 2, -3, -4];
xarray.forEach(x, v => console.log(v));
// → 1
// → 2
// → -3
// → -4