Returns an Array object with the elements reversed.
Remarks
Example
The following example illustrates the use of the reverse method.
| Copy Code |
---|
function ReverseDemo(){
var a, l; //Declare variables.
a = new Array(0,1,2,3,4); //Create an array and populate it.
l = a.reverse(); //Reverse the contents of the array.
return(l); //Return the resulting array.
} |
Requirements
See Also