last

Summary

Returns the last element of the array.

Signatures

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

Usage

public T last()

Returns

The last element of the array.

Description

Returns the last 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.last()); // 5

Share

HTML | BBCode | Direct Link