Reverses the order of items, such as the characters in a
string and the digits in a number

reverse(String) → returns String

Argument Reference for the reverse function


Required: Yes
A string or a variable that contains one

Examples sample code invoking the reverse function

Reverse a string

reverse('Hello World')

Expected Result: dlroW olleH

Reverse a number


Expected Result: 987654321

Fork me on GitHub