Removes an element at index index from data, returning the resulting array without modifying the original.
index
data
import { Arrays } from 'https://unpkg.com/ixfx/dist/data.js';const v = [ 100, 20, 50 ];const vv = Arrays.remove(2);Yields: v: [ 100, 20, 50 ]vv: [ 100, 20 ] Copy
import { Arrays } from 'https://unpkg.com/ixfx/dist/data.js';const v = [ 100, 20, 50 ];const vv = Arrays.remove(2);Yields: v: [ 100, 20, 50 ]vv: [ 100, 20 ]
Consider without if you want to remove an item by value.
Throws an exception if index is outside the range of data array.
Type of array
Input array
Index to remove
Removes an element at
index
index fromdata
, returning the resulting array without modifying the original.Consider without if you want to remove an item by value.
Throws an exception if
index
is outside the range ofdata
array.