# get range()

## `Range.prototype.range`

The [`get`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) accessor obtains the range of an [`Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) of the [minimum](https://docs.angular-package.dev/range-1/range/properties/min) to the [maximum](https://docs.angular-package.dev/range-1/range/properties/max) with the [step](https://docs.angular-package.dev/range-1/range/accessors/get-step) of a specified [`Range`](https://docs.angular-package.dev/range-1/range) object.

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

```typescript
public get range(): Readonly<Array<number>> {
  return this.getRange();
}
```

{% endcode %}

### Type

#### [<mark style="color:green;">`Readonly`</mark>](https://www.typescriptlang.org/docs/handbook/utility-types.html#readonlytype)`<`[<mark style="color:green;">`Array`</mark>](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#arrays)`<`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)`>>`

### Returns

The **return value** is the range from [minimum](https://docs.angular-package.dev/range-1/range/properties/min) to the [maximum](https://docs.angular-package.dev/range-1/range/properties/max) of a read-only [`Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) of [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number).

## 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
// (9) [3, 6, 9, 12, 15, 18, 21, 24, 27] of type readonly number[]
range.range;
```
