reverse

Summary

Reverses the elements of the array.

Usage

public T[] reverse()

Returns

The reversed array.

Description

Reverses the elements of the array and returns the reversed array.

This method mutates the array.

Examples

Basic Usage
1
2
3
4
import System;
 
int[] arr = [ 1, 2, 3 ];
arr.reverse(); // [ 3, 2, 1 ]

Share

HTML | BBCode | Direct Link