/Interview

Primary LanguageJavaScript

Compare two arrays and return a new array with any items only found in one of the two given arrays, but not both. In other words, return the symmetric difference of the two arrays.

You can return the array with its elements in any order.

arr1 = [1, 2, 3] arr2 = [5, 2, 1, 4]