Skip to content

Latest commit

 

History

History

14-array-diff

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Array diff

Purpose

Your goal in this kata is to implement an difference function, which subtracts one list from another. It should remove all values from list a, which are present in list b.

Example

arrayDiff([1,2],[1]); //[2]
arrayDiff([1,2,2,2,3],[2]); // [1,3]
arrayDiff([], [1,2]); // []
arrayDiff([1,2,2], []); // [1,2,2]

Decision