Skip to content
On this page

range

Create an array of sequential numbers without end values.

Example

range(5) // => [0, 1, 2, 3, 4]
range(1, 5) // => [1, 2, 3, 4]
range(0, 10, 2) // => [0, 2, 4, 6, 8]

Playground

const { range } = require('rhodash')
range(5) // => [0, 1, 2, 3, 4]