Generates an array of numbers from start (inclusive) to end (exclusive), incrementing by step.
start
end
step
The first number in the range.
The end of the range (exclusive).
Optional
The increment between numbers.
An array of numbers from start to end with the given step.
range(0, 5); // [0, 1, 2, 3, 4]range(50, 1000, 50); // [50, 100, 150, ..., 950] Copy
range(0, 5); // [0, 1, 2, 3, 4]range(50, 1000, 50); // [50, 100, 150, ..., 950]
Generates an array of numbers from
start(inclusive) toend(exclusive), incrementing bystep.