without

Modified on Mon, 07 Aug 2023

Description

Create an array excluding all given values

Syntax

without(array, value1, valueN)

Parameters

Input ParameterTypeDescription
arrayArrayThe array to inspect.
value1anyThe value to exclude.
valueN (optional)anyThe value to exclude.

Return value

Type
Array

Sample

ExampleResultDescription
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.