getRange()
Returns a range of numbers by the specified `step` from minimum to the given `value` of the specified `Range` object
Range.prototype.getRange()
Range.prototype.getRange()public getRange(value: number = this.max): Readonly<Array<number>> {
const range = [];
let current: number = this.min;
while (current <= value) {
current <= this.max && range.push(current), (current += this.#step);
}
return range;
}Parameters
Return type
Returns
Example usage
Last updated