Skip to content
Subhajit Sahu edited this page Feb 4, 2021 · 15 revisions

Updates values based on map function. 🏃 📼 📦 🌔 📒

Similar: map, reduce, filter, filterAt, reject, rejectAt.


entries.map(x, fm);
// x:  entries
// fm: map function (v, k, x)
const entries = require("extra-entries");

var x = [["a", 1], ["b", 2], ["c", 3], ["d", 4]];
[...entries.map(x, v => v * 2)];
// [ [ "a", 2 ], [ "b", 4 ], [ "c", 6 ], [ "d", 8 ] ]


References

Clone this wiki locally