-
Notifications
You must be signed in to change notification settings - Fork 5
set
Subhajit Sahu edited this page May 19, 2020
·
26 revisions
array.set(x, i, v);
// x: an array
// i: index (-ve: from right)
// v: value
const array = require('extra-array');
var x = [2, 4, 6, 8];
array.set(x, 1, 40);
// [ 2, 40, 6, 8 ]
array.set(x, 3, 80);
// [ 2, 4, 6, 80 ]