Updated tail description

This commit is contained in:
Angelos Chalaris
2017-12-13 11:40:27 +02:00
parent 7cc4f81d6f
commit 07d4086c18
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
### Tail of list
Return `arr.slice(1)`.
Return `arr.slice(1)` if the array's `length` is more than `1`, otherwise return the whole array.
```js
const tail = arr => arr.length > 1 ? arr.slice(1) : arr;