A generator to yield numbers in a given range
Remarks
This method is end-exclusive, for example the last number yielded by
range(5)
is 4. If you prefer for the end to be included add 1 to the range or end
option.Example
Basic range
Example
Range with a step
Name | Type | Optional | Description |
---|---|---|---|
range | RangeOptions | number | No | A number representing the range to yield (exclusive) or an object with start, end and step |