mirror of https://github.com/01-edu/public.git
19 lines
360 B
Markdown
19 lines
360 B
Markdown
|
## Power Ranger
|
||
|
|
||
|
### Instructions
|
||
|
|
||
|
Declare the `range` function that takes 2 number arguments: a `start` and an
|
||
|
`end`.
|
||
|
|
||
|
Create an array of numbers starting from the `start` (included) to the `end`
|
||
|
(excluded).
|
||
|
|
||
|
**Example:**
|
||
|
|
||
|
```js
|
||
|
range(0, 5) //-> [0, 1, 2, 3, 4]
|
||
|
range(10, 7) //-> [10, 9, 8]
|
||
|
range(2, -3) //-> [2, 1, 0, -1, -2]
|
||
|
range(-1, -3) //-> [-1, -2]
|
||
|
```
|