Date

“Array” Methods

_.xor([arrays])

source npm package

Creates an array of unique values that is the symmetric difference of the given arrays. The order of result values is determined by the order they occur in the arrays.

引入版本

2.4.0

参数
[arrays] (...Array) : The arrays to inspect.

返回值
(Array) : Returns the new array of filtered values.

示例
_.xor([2, 1], [2, 3]);
// => [1, 3]