//compare 2 arrays and return unique value between both let arr3 = arr1.filter(function(obj){ return arr2.indexOf(obj) == -1 })