valueUp()

Increments the range value of a specified `Range` object by the range step or given increment

Range.prototype.valueUp()

The valueUp() method increments the range value of a specified Range object by the range step or given stepIncrement.

range.class.ts
public valueUp(stepIncrement = 1): this {
  typeof this.value === 'number' && stepIncrement > 0 &&
    this.setValue(this.value + stepIncrement * this.#step);
  return this;
}

Parameters

stepIncrement:number

The optional stepIncrement parameter of the number type increments the range value. If no parameter is passed, stepIncrement defaults to 1.

Return type

Returns

The return value is the Range instance.

Example usage

Last updated