Policies & Guidelines

REVERSE

Reverse an array

Description

Returns an array containing all the values from the given array, but in reverse order.

Function signature

REVERSE(array: Array) => Array

Parameter

Description

Array

Array to reverse

Examples

charArray = ["a","b","c"]
numbersArray = [1,2,3]
simpleArray = [1]

Formula

Return value

REVERSE(charArray)

["c","b","a"]

REVERSE(numbersArray)

[3,2,1]

REVERSE(simpleArray)

[1]