Skip to content

difference

Creates an array of array values ​​that are not contained in other given arrays.

Usage

ts
import { difference } from 'rattail'

difference([1, 2, 3, 4], [2, 3])
// return [1, 4]
difference([1, 2, 3, 4], [2, 3], [3, 4])
// return [1]

Arguments

ArgTypeDefaults
arrArray
...valuesArray<Array>

Return

Type
Array