Update README.md
This commit is contained in:
@ -746,7 +746,7 @@ const tail = arr => arr.length > 1 ? arr.slice(1) : arr;
|
||||
|
||||
### Take
|
||||
|
||||
Use `.slice()` to create a slice of the array with n elements taken from the beginning.
|
||||
Use `Array.slice()` to create a slice of the array with `n` elements taken from the beginning.
|
||||
|
||||
```js
|
||||
const take = (arr, n = 1) => arr.slice(0, n);
|
||||
|
||||
Reference in New Issue
Block a user