difference

Modified on Mon, 07 Aug 2023

Description

Create an array of array values not included in the other given arrays

Syntax

difference(array1, array2)

Parameters

Input ParameterTypeDescription
array1ArrayThe array to inspect
array2ArrayThe values to exclude

Return value

Type
Array

Sample

ExampleResultDescription
difference([2, 1], [2, 3]);[1]Returns the new array of filtered values.

To view all the List functions, click here.