Files
30-seconds-of-code/snippets/last-of-list.md
2017-12-12 07:11:37 -05:00

8 lines
94 B
Markdown

### Last of list
Return `arr.slice(-1)[0]`.
```js
const last = arr => arr.slice(-1)[0];
```