<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [rc-js-util](./rc-js-util.md) &gt; [arrayCopyInto](./rc-js-util.arraycopyinto.md)

## arrayCopyInto() function

Make an array contain the same items as another.

**Signature:**

```typescript
export declare function arrayCopyInto<TItem>(from: ArrayLike<TItem>, to: TItem[], startIndex?: number, length?: number): void;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

from


</td><td>

ArrayLike&lt;TItem&gt;


</td><td>

The array to copy from.


</td></tr>
<tr><td>

to


</td><td>

TItem\[\]


</td><td>

The array to copy into and resize.


</td></tr>
<tr><td>

startIndex


</td><td>

number


</td><td>

_(Optional)_ The index to start with in the from array.


</td></tr>
<tr><td>

length


</td><td>

number


</td><td>

_(Optional)_ The index to end with in the from array.


</td></tr>
</tbody></table>
**Returns:**

void

## Remarks

See [arrayCopyInto()](./rc-js-util.arraycopyinto.md)<!-- -->.

