-
Notifications
You must be signed in to change notification settings - Fork 1
map
wolfram77 edited this page Mar 27, 2020
·
26 revisions
Updates values based on map function.
array.map(x, fn, [ths]);
// x: an array
// fn: map function (v, i, x)
// ths: this argument
const array = require('extra-array');
var x = [1, 2, 3, 4];
array.map(x, v => v * 2);
// [2, 4, 6, 8]