rc-js-util
Version:
A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.
78 lines (37 loc) • 1.07 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [rc-js-util](./rc-js-util.md) > [arrayGenerateRange](./rc-js-util.arraygeneraterange.md)
## arrayGenerateRange() function
Generates a range of integers output in an `Array`<!-- -->.
**Signature:**
```typescript
export declare function arrayGenerateRange(from: number, to: number): number[];
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
from
</td><td>
number
</td><td>
The value to start from (inclusive).
</td></tr>
<tr><td>
to
</td><td>
number
</td><td>
The value to finish with (inclusive).
</td></tr>
</tbody></table>
**Returns:**
number\[\]
An array \[from, from + 1, ..., to -1, to\].
## Remarks
Where `from` and `to` are equal a length 1 array is returned, NaN input is not supported.
See [arrayGenerateRange()](./rc-js-util.arraygeneraterange.md)<!-- -->.