The array of interest.
The value to remove from the array. Values are
compared using strict === equality.
The index of the first element in the range to be
searched, inclusive. The default value is 0. Negative values
are taken as an offset from the end of the array.
The index of the last element in the range to be
searched, inclusive. The default value is -1. Negative values
are taken as an offset from the end of the array.
The number of elements removed from the array.
If stop < start the search will conceptually wrap at the end of
the array, however the array will be traversed front-to-back.
Linear.
import { ArrayExt } from '@lumino/algorithm';
let data = [14, 12, 23, 39, 14, 12, 19, 14];
ArrayExt.removeAllOf(data, 12); // 2
ArrayExt.removeAllOf(data, 17); // 0
ArrayExt.removeAllOf(data, 14, 1, 4); // 1
Remove all occurrences of a value from an array.