Updated examples
This commit is contained in:
@ -9,7 +9,7 @@ const dropRight = (arr, n = 1) => arr.slice(0, -n);
|
||||
```
|
||||
|
||||
```js
|
||||
dropRight([1,2,3]) -> [1,2]
|
||||
dropRight([1,2,3], 2) -> [1]
|
||||
dropRight([1,2,3], 42) -> []
|
||||
dropRight([1,2,3]) // [1,2]
|
||||
dropRight([1,2,3], 2) // [1]
|
||||
dropRight([1,2,3], 42) // []
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user