Merge pull request #105 from kingdavidmartins/update-last-of-list
update last-of-list & ran npm run build-list
This commit is contained in:
@ -451,7 +451,7 @@ const initializeArray = (n, value = 0) => Array(n).fill(value);
|
|||||||
|
|
||||||
### Last of list
|
### Last of list
|
||||||
|
|
||||||
Return `arr.slice(-1)[0]`.
|
Use `arr.slice(-1)[0]` to get the last element of the given array.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const last = arr => arr.slice(-1)[0];
|
const last = arr => arr.slice(-1)[0];
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
### Last of list
|
### Last of list
|
||||||
|
|
||||||
Return `arr.slice(-1)[0]`.
|
Use `arr.slice(-1)[0]` to get the last element of the given array.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const last = arr => arr.slice(-1)[0];
|
const last = arr => arr.slice(-1)[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user