valueDown()

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

Range.prototype.valueDown()

The valueDown() method decrements the range value of a specified Range object by the range step or given stepDecrement.

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

Parameters

stepDecrement:numberarrow-up-right

The optional stepDecrement parameter of the numberarrow-up-right type decrements the range value. If no parameter is passed, stepDecrement defaults to 1.

Return type

Returns

The return value is the Range instance.

Example usage

Last updated