Create array-without.md

This commit is contained in:
taltmann42
2017-12-15 00:23:10 +01:00
committed by GitHub
parent 74b5a78f2b
commit e96393019c

View File

@ -0,0 +1,9 @@
### Array without
Filters out array elements if they are included in the given `values` arguments
```js
const without = ((arr, ...values) => arr.filter(x => !values.includes(x)))
//without([2, 1, 2, 3], 1, 2); -> [3]
```