setValueToStep()

Sets the value of the specified `Range` object to the value of the given `step`

Range.prototype.setValueToStep()

The method setValueToStep() sets the value of the specified Range object to the value of the given step.

range.class.ts
public setValueToStep(step: number): this {
  step > 0 && (this.value = this.getValueOfStep(step));
  return this;
}

Parameters

step:number

Step of number type to retrieve the value from the range and set it as the range current value.

Return type

Returns

The return value is the Range instance.

Example usage

Last updated