Remove and return a value at a specific index in an array.
The value at the specified index, or undefined if the index is out of range.
undefined
Linear.
An index which is non-integral.
index
import { ArrayExt } from '@lumino/algorithm';let data = [0, 12, 23, 39, 14, 12, 75];ArrayExt.removeAt(data, 2); // 23ArrayExt.removeAt(data, -2); // 12ArrayExt.removeAt(data, 10); // undefined;
The array of interest.
The index of the value to remove. Negative values are taken as an offset from the end of the array.
Generated using TypeDoc
Remove and return a value at a specific index in an array.
Returns
The value at the specified index, or
undefinedif the index is out of range.Complexity
Linear.
Undefined Behavior
An
indexwhich is non-integral.Example