addArrayItems()function
addArrayItems(arr: MutableArray<T>, ...items: T[]): void
| Param | Type | |
|---|---|---|
arr | MutableArray<T> | The array to add to (modified in place). required |
items | T[] | The items to add. required |
Add multiple items to an array (by reference).
- Skip items that already exist.
Examples
addArrayItems(arr, 3, 4); // (`arr` now contains `3` and `4`)