I have to do an exercise where in a function that receives two arrays, it compares them and returns the difference between them, both the difference of array1 and the difference of array2.
I have reviewed similar questions but no solution works because they only compare one array and I need the differentiation of the two arrays
i have this arrays
const arr1 = ["andesite", "grass", "dirt", "pink wool", "dead shrub"];
const arr2 = ["diorite", "andesite", "grass", "dirt", "dead shrub"];
and i hope this result
["diorite", "pink wool"]
if not exist difference, return this
[]