Siebel eScript Language Reference > Methods Reference > Array Methods >

Reverse Array Order Method


The Reverse Array Order method reverses the order of the array elements so that the last element becomes the first element. It returns the elements in reverse order. It returns this reverse order in the arrayName argument. It reverses the existing array. It does not return a new array.

Format

arrayName.reverse()

Example

The following example includes the Reverse Array Order method:

var communalInsect = new Array;
communalInsect[0] = "ant";
communalInsect[1] = "bee";
communalInsect[2] = "wasp";
communalInsect.reverse();

This example produces the following array:

communalInsect[0] == "wasp"
communalInsect[1] == "bee"
communalInsect[2] == "ant"

Siebel eScript Language Reference Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.