update snippets 47-62
This commit is contained in:
@ -6,5 +6,8 @@ Use `arr.slice(0,-1)` to return all but the last element of the array.
|
||||
|
||||
```js
|
||||
const initial = arr => arr.slice(0, -1);
|
||||
// initial([1,2,3]) -> [1,2]
|
||||
```
|
||||
|
||||
```js
|
||||
initial([1,2,3]) -> [1,2]
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user