-
Notifications
You must be signed in to change notification settings - Fork 3
forEach
Subhajit Sahu edited this page Jun 13, 2020
·
4 revisions
Calls a function for each value. [:running:] [:vhs:] [:package:] [:moon:] [:ledger:]
map.forEach(x, fn, [ths]);
// x: a map
// fn: called function (v, k, x)
// ths: this argument
const object = require('extra-object');
var x = {a: 1, b: 2, c: -3, d: -4};
object.forEach(x, v => console.log(v));
// 1
// 2
// -3
// -4