In lodash there is the _.xor method that can create a new array that is the symmetric difference of the given arrays. In other words it will be an array of elements that show up in the arrays that are unique to each array, but not elements that are shared across all the arrays, or in other words elements that are intersections.
For a basic example of the lodash xor method consider two arrays one with elements that are the numbers [0,1], and another with the numbers [1,2]. If the arrays are given to the lodash xor method the resulting array should be [0,2]
As a lodash end user I often just call methods like _.xor, get the result that I want, and then move on. However some times I take a look at the lodash source code to gain a deeper understanding and apprehension of what is going on with the lodash source code. Even if you do not use lodash, or maybe just a method or two now and then at all, the lodash source code is still worth checking out when it comes to reading code.
I was able to get a similar result by copying and pasting in much of the lodash internals like this.