Array object with the elements reversed.
arrayObj reference is an Array object.
reverse method reverses the elements of an Array object in place. It does not create a new Array object during execution.
If the array is not contiguous, the
reverse method creates elements in the array that fill the gaps in the array. Each of these created elements has the value undefined.
The following example illustrates the use of the
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.
Supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards. See
Did you find this helpful?
( 1500 characters remaining)
Thank you for your feedback