Remove First
Removes the first element of an array.
Category | Arrays |
Author | Pol Gubau |
Since | 1.0.0 |
Last Updated | 2025-03-15 |
Type | Sync |
Compatibility | Universal |
Example
Input
removeFirst([1, 2, 3])
Output:
[2, 3]
Return
A new array without the first element.
Type: array
Props
Name | Type | Default | Required | Description |
---|---|---|---|---|
arr | T[] | null | Yes | The array from which to remove the first element. |
Notes
The original array is not mutated.
Tags
- array
- remove
- first
- element