Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) of the given arrays. The order of result values is determined by the order they occur in the arrays.
xor([2, 1], [2, 3])
// => [1, 3]
Name | Type | Attribute | Description |
---|---|---|---|
arrays | The arrays to inspect. |
{ "comment": "/**\r\n * Creates an array of unique values that is the\r\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\r\n * of the given arrays. The order of result values is determined by the order\r\n * they occur in the arrays.\r\n *\r\n * @since 2.4.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to inspect.\r\n * @returns {Array} Returns the new array of filtered values.\r\n * @see difference, union, unionBy, unionWith, without, xorBy, xorWith\r\n * @example\r\n *\r\n * xor([2, 1], [2, 3])\r\n * // => [1, 3]\r\n */", "meta": { "range": [ 694, 780 ], "filename": "xor.js", "lineno": 21, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\lodash\\lodash-repo", "code": { "id": "astnode100011727", "name": "xor", "type": "FunctionDeclaration", "paramnames": [ "arrays" ] } }, "description": "Creates an array of unique values that is the\r[symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\rof the given arrays. The order of result values is determined by the order\rthey occur in the arrays.", "since": "2.4.0", "tags": [ { "originalTitle": "category", "title": "category", "text": "Array", "value": "Array" } ], "params": [ { "type": { "names": [ "Array" ] }, "optional": true, "variable": true, "description": "The arrays to inspect.", "name": "arrays" } ], "returns": [ { "type": { "names": [ "Array" ] }, "description": "Returns the new array of filtered values." } ], "see": [ "difference, union, unionBy, unionWith, without, xorBy, xorWith" ], "examples": [ "xor([2, 1], [2, 3])\r// => [1, 3]" ], "name": "xor", "longname": "xor", "kind": "function", "scope": "global", "___id": "T000002R001060", "___s": true, "filepath": "xor.js" }