first

Summary

Returns the first element of the array.

Signatures

Click on a signature to select it and view its documentation.

Usage

public T first()

Returns

The first element of the array.

Description

Returns the first element of the array.

This method does not mutate the array.

Examples

Basic Usage
1
2
3
4
import System;
 
int[] arr = [ 3, 4, 5 ];
Console.log(arr.first()); // 3

Share

HTML | BBCode | Direct Link