-
Notifications
You must be signed in to change notification settings - Fork 5
set$
wolfram77 edited this page Mar 25, 2020
·
27 revisions
Sets value at index (+ve, -ve).
Alternatives: [default], [update].
array.set$(x, i, v);
// x: an array (updated)
// i: index (-ve: from right)
// v: value
// --> x
const array = require('extra-array');
var x = [2, 4, 6, 8];
array.set$(x, 1, -4);
// [2, -4, 6, 8]
x;
// [2, -4, 6, 8]
var x = [2, 4, 6, 8];
array.set$(x, -1, -8);
// [2, 4, 6, -8]