主题
xor
js
_.xor([arrays])
创建唯一值数组,该数组是给定数组的 对称差异。结果值的顺序由它们在数组中出现的顺序决定。
¥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.
新增于
¥Since
2.4.0
参数
¥Arguments
[arrays]
(...数组):要检查的数组。¥
[arrays]
(...Array): The arrays to inspect.
返回
¥Returns
(数组):返回新的过滤值数组。
¥(Array): Returns the new array of filtered values.
示例
¥Example
js
_.xor([2, 1], [2, 3]);
// => [1, 3]