Skip to content

forEach

Subhajit Sahu edited this page Feb 3, 2021 · 16 revisions

Calls a function for each value. 📦 😺 🏃 📼 🌔 📜 📰 📘


set.forEach(x, fc);
// x:  a set
// fc: called 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


References

Clone this wiki locally