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