first-elements
array →
first-elements(
count: integer
) → array
Returns up to the requested number of elements from the start of the input enumerable. Returns null when the input is not an enumerable, is a string, or the count is negative.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
count | integer | Yes | Number of elements to return from the start of the input. |
Examples
{1, 2, 3} | first-elements(2) → {1, 2}
Kind: Function
Scope: array
Aliases: first