Trying to solve symmetric difference using Javascript

As with all problems, it’s best to start off writing an algorithm: Concatenate versions of the arrays, where each array is filtered to contain those elements which no array other than the current one contains Then just write that down in JS: function sym() { var arrays = [].slice.apply(arguments); return [].concat.apply([], // concatenate arrays.map( // … Read more