-
Notifications
You must be signed in to change notification settings - Fork 1
forEach
Subhajit Sahu edited this page Dec 2, 2022
·
16 revisions
Call a function for each value.
function forEach(x, fp)
// x: a set
// fp: process function (v, v, x)
const set = require('extra-set');
var x = new Set([1, 2, -3, -4]);
set.forEach(x, v => console.log(v));
// → 1
// → 2
// → -3
// → -4