Skip to content

remove$

Subhajit Sahu edited this page May 3, 2023 · 15 revisions

Remove value at index!

Alternatives: remove, remove$, removePath$.
Similar: get, set, remove.


function remove$(x, i)
// x: an array (updated!)
// i: index
const xarray = require('extra-array');

var x = [1, 2, 3, 4, 5];
xarray.remove$(x, 2);
// → [ 1, 2, 4, 5 ]

x;
// → [ 1, 2, 4, 5 ]


References

Clone this wiki locally