# valueDown()

## `Range.prototype.valueDown()`

The `valueDown()` method decrements the range [value](/range-1/range/accessors/value.md) of a specified [`Range`](/range-1/range/overview.md) object by the range [step](/range-1/range/accessors/get-step.md) or given [`stepDecrement`](#stepdecrement-number).

{% code title="range.class.ts" %}

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

{% endcode %}

### Parameters

#### `stepDecrement:`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

The optional `stepDecrement` parameter of the [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) type decrements the range [`value`](https://docs.angular-package.dev/range-1/range/methods/pages/9mgAFAcwZJAd3Km6iqZw#range.prototype.value). If no parameter is passed, `stepDecrement` defaults to **`1`**.

### Return type

#### [<mark style="color:green;">`this`</mark>](/range-1/range/overview.md)

### Returns

The **return value** is the [`Range`](/range-1/range/overview.md) instance.

## Example usage

```typescript
// Example usage.
import { Range } from '@angular-package/range';

// Create new instance.
// Returns Range {min: 3, max: 27, value: 10} of Range<3, 27, 3>.
const range = new Range(3, 27, 10, 3);

// Returns 10.
range.value;

// Returns 7.
range.valueDown().value;

// Returns 4.
range.valueDown(1).value;
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.angular-package.dev/range-1/range/methods/valuedown.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
