range()

Creates an array of numbers within a given range.

This function is valid in v2.0.0 to v2.13.1. This function has been downloaded 25 times.

Parameters

{number} startOrStop
The starting point of the range to return. If this is the argument argument passed the value will be used as opt_stop and this will become 0.
{number=} opt_stop Optional, Default:startOrStop
The non-inclusive boundary of the range. This value will not be included in the returned array. The value is pulled from startOrStop if not specified.
{number=} opt_step Optional, Default:1
The difference between each subsequent number in the range.

Returns

{Array.<number>}
Returns an array of all of the numbers in the range. If opt_step >= 0 but startOrStop >= opt_stop, an empty array will be returned. Also, if opt_step <= 0, but startOrStop <= opt_stop, an empty array will be returned.