Creates an array that excludes all specified values.
It correctly excludes NaN, as it compares values using SameValueZero.
NaN
The type of elements in the array.
The array to filter.
Rest
The values to exclude.
A new array without the specified values.
// Removes the specified values from the arraywithout([1, 2, 3, 4, 5], 2, 4);// Returns: [1, 3, 5] Copy
// Removes the specified values from the arraywithout([1, 2, 3, 4, 5], 2, 4);// Returns: [1, 3, 5]
// Removes specified string values from the arraywithout(['a', 'b', 'c', 'a'], 'a');// Returns: ['b', 'c'] Copy
// Removes specified string values from the arraywithout(['a', 'b', 'c', 'a'], 'a');// Returns: ['b', 'c']
Alias