> For the complete documentation index, see [llms.txt](https://lodash.shujuwajue.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lodash.shujuwajue.com/array/without.md).

# \_.without（过滤元素值）

**语法：**

```javascript
_.without(array, [values])
```

**源代码链接：**[source](https://github.com/lodash/lodash/blob/4.17.10/lodash.js#L8535)

**npm包链接：**[npm package](https://www.npmjs.com/package/lodash.without)

**描述：**

创建一个剔除所有给定值的新数组，剔除值的时候，使用[`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)做相等比较。

> **注意:**&#x4E0D;像[`_.pull`](https://lodash.com/docs/4.17.10#pull), \_.without 这个方法会返回一个新数组。

**开始版本：**&#x30;.1.0

**参数：**

* `array (Array)`: 要检查的数组。
* `[values] (...*)`: 要剔除的值。&#x20;

**返回值：**

* `(Array)`: 返回过滤值后的新数组。

**例子：**

```javascript
_.without([2, 1, 2, 3], 1, 2);
// => [3]
```
