Snippet format update
To match the starter (for the migration)
This commit is contained in:
@ -1,4 +1,7 @@
|
||||
### shank
|
||||
---
|
||||
title: shank
|
||||
tags: array,intermediate
|
||||
---
|
||||
|
||||
Has the same functionality as [`Array.prototype.splice()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice), but returning a new array instead of mutating the original array.
|
||||
|
||||
@ -20,4 +23,4 @@ const names = ['alpha', 'bravo', 'charlie'];
|
||||
const namesAndDelta = shank(names, 1, 0, 'delta'); // [ 'alpha', 'delta', 'bravo', 'charlie' ]
|
||||
const namesNoBravo = shank(names, 1, 1); // [ 'alpha', 'charlie' ]
|
||||
console.log(names); // ['alpha', 'bravo', 'charlie']
|
||||
```
|
||||
```
|
||||
Reference in New Issue
Block a user