Skip to content

forEach

Subhajit Sahu edited this page Jun 17, 2020 · 12 revisions

Calls a function for each value. 🏃 📼 📦 🌔 📒

entries.forEach(x, fc);
// x:  entries
// fc: called function (v, k, x)
const entries = require('extra-entries');

var x = [['a', 1], ['b', 2], ['c', -3], ['d', -4]];
entries.forEach(x, v => console.log(v));
// 1
// 2
// -3
// -4

references

Clone this wiki locally