Snippet format update
To match the starter (for the migration)
This commit is contained in:
@ -1,4 +1,7 @@
|
||||
### drop
|
||||
---
|
||||
title: drop
|
||||
tags: array,beginner
|
||||
---
|
||||
|
||||
Returns a new array with `n` elements removed from the left.
|
||||
|
||||
@ -12,4 +15,4 @@ const drop = (arr, n = 1) => arr.slice(n);
|
||||
drop([1, 2, 3]); // [2,3]
|
||||
drop([1, 2, 3], 2); // [3]
|
||||
drop([1, 2, 3], 42); // []
|
||||
```
|
||||
```
|
||||
Reference in New Issue
Block a user