without
Modified on Mon, 07 Aug 2023
Description
Create an array excluding all given values
Syntax
without(array, value1, valueN)
Parameters
Input Parameter | Type | Description |
---|---|---|
array | Array | The array to inspect. |
value1 | any | The value to exclude. |
valueN (optional) | any | The value to exclude. |
Return value
Type |
---|
Array |
Sample
Example | Result | Description |
---|---|---|
without([2, 1, 2, 3], 1) | [2, 3] | Returns an array excluding 1 |
without([2, 1, 2, 3], 1, 2) | [3] | Returns an array excluding 1 and 2 |
without([2, 1, 2, 3], 1, 2, 3) | [] | Returns an array excluding 1, 2 and 3 |
To view all the List functions, click here.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article