企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
## union + [link](./union "Link to this entry.") + [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L6785 "View in source.") + [npm](https://www.npmjs.com/package/lodash.union "See the npm package.") ``` _.union([arrays]) ``` 创建顺序排列的唯一值组成的数组。所有值经过 [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) 等值比较。 ### 参数 1. [arrays] (...Array) 需要处理的数组队列 ### 返回值 (Array) 返回处理好的数组 ### 示例 ``` _.union([2, 1], [4, 2], [1, 2]); // => [2, 1, 4] ```