Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 509 Bytes

difference.md

File metadata and controls

33 lines (21 loc) · 509 Bytes

arrays.difference

difference(arrayA, arrayB)

Finds the difference of two arrays

Arguments

  1. arrayA (Array): first input array
  2. arrayB (Array): second input array

Returns

(Array): an array containing the difference

Example

const result = arrays.difference([2, 1], [2, 3]);
console.log(result);
> [1]