> For the complete documentation index, see [llms.txt](https://range.angular-package.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://range.angular-package.dev/draft/range/methods.md).

# Methods

The \`Range\` object methods

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public static</strong> <a href="/draft/range/methods/static-create.md"><strong>create()</strong></a>: <mark style="color:green;">Range</mark><<mark style="color:green;">Value</mark>><br>Returns a new instance of <a href="/draft/range/overview.md"><code>Range</code></a> with a range of the given required <a href="/draft/range/methods/static-create.md#min-min"><code>min</code></a>, <a href="/draft/range/methods/static-create.md#max-max"><code>max</code></a> and optional current <a href="/draft/range/methods/static-create.md#value-number"><code>value</code></a>, <a href="/draft/range/methods/static-create.md#step-step-1-asstep"><code>step</code></a>.</p>                                            |
| <p><strong>public static</strong> <a href="/draft/range/methods/static-createfrom.md"><strong>createFrom()</strong></a>: <mark style="color:green;">Range</mark><<mark style="color:green;">number</mark>, <mark style="color:green;">number</mark>, <mark style="color:green;">Step</mark>><br>Creates the <a href="/draft/range/overview.md"><code>Range</code></a> instance from the given random <a href="/draft/range/methods/static-createfrom.md#numbers-number"><code>numbers</code></a> and the <a href="/draft/range/methods/static-createfrom.md#step-step"><code>step</code></a>.</p>                                                                                                                                         |
| <p><strong>public static</strong> <a href="/draft/range/methods/static-createminimum.md"><strong>createMaximum()</strong></a>: <mark style="color:green;">Maximum</mark><<mark style="color:green;">Value</mark>><br>Returns the <a href="/draft/maximum/overview.md"><code>Maximum</code></a> instance of the given <strong>maximum</strong> <a href="/draft/range/methods/static-createmaximum.md#value-value"><code>value</code></a>.</p>                                                                                                                                                                                                                                                                                              |
| <p><strong>public static</strong> <a href="/draft/range/methods/static-createminimum.md"><strong>createMinimum()</strong></a>: <mark style="color:green;">Minimum</mark><<mark style="color:green;">Value</mark>><br>Returns the <a href="/draft/minimum/overview.md"><code>Minimum</code></a> instance of the given <strong>minimum</strong> <a href="/draft/range/methods/static-createminimum.md#value-value"><code>value</code></a>.</p>                                                                                                                                                                                                                                                                                              |
| <p><strong>public static</strong> <a href="/draft/range/methods/static-isrange.md"><strong>isRange()</strong></a>: value is <mark style="color:green;">Range</mark><<mark style="color:green;">Min</mark>, <mark style="color:green;">Max</mark>><br>Checks whether the <a href="/draft/range/methods/static-isrange.md#value-any"><code>value</code></a> is an instance of <a href="/draft/range/overview.md"><code>Range</code></a> of any or the given <a href="/draft/range/methods/static-isrange.md#min-min"><strong>minimum</strong></a> and <a href="/draft/range/methods/static-isrange.md#max-max"><strong>maximum</strong></a> range and <a href="/draft/range/methods/static-isrange.md#step-step"><code>step</code></a>.</p> |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public</strong> <a href="/draft/range/methods/foreachstep.md"><strong>forEachStep()</strong></a>: <mark style="color:green;">this</mark><br>Performs the specified action for each step in the <a href="/draft/range/properties/max.md">maximum</a> range of an <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array"><code>Array</code></a>.</p>                                                                                                                                                                 |                                                                                                                                                                                                                                                                                                                                                                                                                  |
| <p><strong>public</strong> <a href="/draft/range/methods/getcurrentrange.md"><strong>getCurrentRange()</strong></a>: <mark style="color:green;">Readonly</mark><<mark style="color:green;">Array</mark><<mark style="color:green;">number</mark>>>                                                                                                                                                                                                                                                                                                                      | <mark style="color:green;">undefined</mark><br>Returns a range of numbers from <a href="/draft/range/properties/min.md">minimum</a> to the current <a href="/draft/range/accessors/value.md">value</a> by the <a href="/draft/range/accessors/get-step.md"><code>step</code></a> of a specified <a href="/draft/range/overview.md"><code>Range</code></a> object.</p>                                            |
| <p><strong>public</strong> <a href="/draft/range/methods/getcurrentstep.md"><strong>getCurrentStep()</strong></a>: <mark style="color:green;">number</mark>                                                                                                                                                                                                                                                                                                                                                                                                             | <mark style="color:green;">undefined</mark><br>Returns the step of the range <a href="/draft/range/accessors/value.md">value</a>.</p>                                                                                                                                                                                                                                                                            |
| <p><a href="/draft/general-concepts.md#undefined"><mark style="color:red;">⚠</mark></a> <strong>public</strong> <a href="/draft/range/methods/getmax.md"><strong>getMax()</strong></a>: <mark style="color:green;">Max</mark><br>Gets the <strong>maximum</strong> range of a specified <a href="/draft/range/overview.md"><code>Range</code></a> object.</p>                                                                                                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                  |
| <p><a href="/draft/general-concepts.md#undefined"><mark style="color:red;">⚠</mark></a> <strong>public</strong> <a href="/draft/range/methods/getmin.md"><strong>getMin()</strong></a>: <mark style="color:green;">Min</mark><br>Gets the <strong>minimum</strong> range of a specified <a href="/draft/range/overview.md"><code>Range</code></a> object.</p>                                                                                                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                  |
| <p><strong>public</strong> <a href="/draft/range/methods/getrange.md"><strong>getRange()</strong></a>: <mark style="color:green;">number</mark>\[]<br>Returns range of numbers from <a href="/draft/range/properties/min.md">minimum</a> to the given <a href="/pages/dXvAlbtLbzaj3w9i2tZv#value-number-this.max"><code>value</code></a> with the <a href="/draft/range/accessors/get-step.md"><code>step</code></a> of a specified <a href="/draft/range/overview.md"><code>Range</code></a> object.</p>                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                  |
| <p><strong>public</strong> <a href="/draft/range/methods/getrangeofstep.md"><strong>getRangeOfStep()</strong></a>: <mark style="color:green;">Readonly</mark><<mark style="color:green;">Array</mark><<mark style="color:green;">number</mark>>>                                                                                                                                                                                                                                                                                                                        | <mark style="color:green;">undefined</mark><br>Returns a range of numbers by the specified <a href="/draft/range/accessors/get-step.md"><code>step</code></a> from the <a href="/draft/range/properties/min.md">minimum</a> to the given <a href="/draft/range/methods/getrangeofstep.md#step-number"><code>step</code></a> of a specified <a href="/draft/range/overview.md"><code>Range</code></a> object.</p> |
| <p><strong>public</strong> <a href="/draft/range/methods/getvalueofstep.md"><strong>getValueOfStep()</strong></a>: <mark style="color:green;">number</mark>                                                                                                                                                                                                                                                                                                                                                                                                             | <mark style="color:green;">undefined</mark><br>Returns the range value of the given <a href="/draft/range/methods/getvalueofstep.md#step-number"><code>step</code></a>.</p>                                                                                                                                                                                                                                      |
| <p><strong>public</strong> <a href="/draft/range/methods/has.md"><strong>has()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/draft/range/methods/has.md#value-number"><code>value</code></a> is in the range of a specified <a href="/draft/range/overview.md"><code>Range</code></a> object.</p>                                                                                                                                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                  |
| <p><strong>public</strong> <a href="/draft/range/methods/hasevery.md"><strong>hasEvery()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether every value of the given <a href="/pages/RBfEX2Ue9lGCEUX8HgIp#...values-number"><code>values</code></a> is in the range of a specified <a href="/draft/range/overview.md"><code>Range</code></a> object.</p>                                                                                                                                                                                         |                                                                                                                                                                                                                                                                                                                                                                                                                  |
| <p><strong>public</strong> <a href="/draft/range/methods/hassome.md"><strong>hasSome()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether some <a href="/pages/btdZ4Qh7QdlmIZWnmXrN#...values-number"><code>values</code></a> are in the range of a specified <a href="/draft/range/overview.md"><code>Range</code></a> object.</p>                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                  |
| <p><strong>public</strong> <a href="/draft/range/methods/isbetween.md"><strong>isBetween()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether range of the given <a href="/draft/range/methods/isbetween.md#min-number"><code>min</code></a> and <a href="/draft/range/methods/isbetween.md#max-number"><code>max</code></a> is between the range of a specified <a href="/draft/range/overview.md"><code>Range</code></a> object.</p>                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                  |
| <p><strong>public</strong> <a href="/draft/range/methods/isbetweenevery.md"><strong>isBetweenEvery()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the range of a specified <a href="/draft/range/overview.md"><code>Range</code></a> object is between every range of the given <a href="/pages/xUAw8v9sZBu77tIqcfOA#...ranges-number-number"><code>ranges</code></a>.</p>                                                                                                                                                                 |                                                                                                                                                                                                                                                                                                                                                                                                                  |
| <p><strong>public</strong> <a href="/draft/range/methods/isbetweensome.md"><strong>isBetweenSome()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the range of a specified <a href="/draft/range/overview.md"><code>Range</code></a> object is between <strong>some</strong> given <a href="/pages/MoZjsKLwzky7aZw9h2qv#...ranges-number-number"><code>ranges</code></a>.</p>                                                                                                                                                                |                                                                                                                                                                                                                                                                                                                                                                                                                  |
| <p><strong>public</strong> <a href="/draft/range/methods/maxgreaterthan.md"><strong>maxGreaterThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/draft/range/methods/maxgreaterthan.md#value-number"><code>value</code></a> is <strong>less</strong> than the <a href="/draft/range/properties/max.md"><strong>maximum</strong></a> <strong>range</strong> of a specified <a href="/draft/range/overview.md"><code>Range</code></a> object.</p>                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                  |
| <p><strong>public</strong> <a href="/draft/range/methods/maxlessthan.md"><strong>maxLessThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/draft/range/methods/maxlessthan.md#value-number"><code>value</code></a> is greater than the <a href="/draft/range/properties/max.md"><strong>maximum</strong></a> <strong>range</strong> of a specified <a href="/draft/range/overview.md"><code>Range</code></a> object.</p>                                                                                                    |                                                                                                                                                                                                                                                                                                                                                                                                                  |
| <p><strong>public</strong> <a href="/draft/range/methods/mingreaterthan.md"><strong>minGreaterThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/draft/range/methods/mingreaterthan.md#value-number"><code>value</code></a> is <strong>less</strong> than a <a href="/draft/range/properties/min.md"><strong>minimum</strong></a> <strong>range</strong> of a specified <a href="/draft/range/overview.md"><code>Range</code></a> object.</p>                                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                  |
| <p><strong>public</strong> <a href="/draft/range/methods/minlessthan.md"><strong>minLessThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/draft/range/methods/minlessthan.md#value-number"><code>value</code></a> is greater than the <a href="/draft/range/properties/min.md"><strong>minimum</strong></a> <strong>range</strong> of a specified <a href="/draft/range/overview.md"><code>Range</code></a> object.</p>                                                                                                    |                                                                                                                                                                                                                                                                                                                                                                                                                  |
| <p><strong>public</strong> <a href="/draft/range/methods/setvalue.md"><strong>setValue()</strong></a>: <mark style="color:green;">this</mark><br>Sets the range <a href="/draft/range/accessors/value.md"><code>value</code></a> between the <a href="/draft/range/properties/min.md">minimum</a> and <a href="/pages/axyOCaYA3ZNCNCFu5va6#range.prototype.max">maximum</a> of a specified <a href="/draft/range/overview.md"><code>Range</code></a> object.</p>                                                                                                        |                                                                                                                                                                                                                                                                                                                                                                                                                  |
| <p><strong>public</strong> <a href="/draft/range/methods/setvaluetostep.md"><strong>setValueToStep()</strong></a>: <mark style="color:green;">this</mark><br>Sets the <a href="/draft/range/accessors/value.md"><code>value</code></a> of the specified <a href="/draft/range/overview.md"><code>Range</code></a> object to the value of the given <a href="/draft/range/methods/setvaluetostep.md#step-number"><code>step</code></a>.</p>                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                  |
| <p><strong>public</strong> <a href="/draft/range/methods/stepbystep.md"><strong>stepByStep()</strong></a>: <mark style="color:green;">this</mark><br>Performs a callback function with the ability to decide when to move to the next step of the range.</p>                                                                                                                                                                                                                                                                                                            |                                                                                                                                                                                                                                                                                                                                                                                                                  |
| <p><a href="/draft/general-concepts.md#undefined"><mark style="color:red;">⚠</mark></a> <strong>public</strong> <a href="/draft/range/methods/toarray.md"><strong>toArray()</strong></a>: readonly \[<mark style="color:green;">Min</mark>, <mark style="color:green;">Max</mark>]<br>Returns a read-only array of the range in order minimum and maximum.</p>                                                                                                                                                                                                          |                                                                                                                                                                                                                                                                                                                                                                                                                  |
| <p><a href="/draft/general-concepts.md#undefined"><mark style="color:red;">⚠</mark></a> <strong>public</strong> <a href="/pages/pAvLgk7tvMGKtjf2J13G#range.prototype.valueof"><strong>valueOf()</strong></a>: <mark style="color:green;">Readonly</mark><{ min: <mark style="color:green;">Min</mark>; max: <mark style="color:green;">Max</mark> }><br>Returns a read-only object consisting of the primitive values of <a href="/draft/minimum/overview.md"><code>Minimum</code></a> and <a href="/draft/maximum/overview.md"><code>Maximum</code></a> instances.</p> |                                                                                                                                                                                                                                                                                                                                                                                                                  |
