Linting
This commit is contained in:
@ -6,7 +6,7 @@ Use `Array((end + 1) - start)` to create an array of the desired length, `Array.
|
||||
You can omit `start` to use a default value of `0`.
|
||||
|
||||
```js
|
||||
const initializeArrayWithRange = (end, start = 0) =>
|
||||
const initializeArrayWithRange = (end, start = 0) =>
|
||||
Array.from({ length: (end + 1) - start }).map((v, i) => i + start);
|
||||
// initializeArrayWithRange(5) -> [0,1,2,3,4,5]
|
||||
// initializeArrayWithRange(7, 3) -> [3,4,5,6,7]
|
||||
|
||||
Reference in New Issue
Block a user