Table of Contents

Array.reverse( ) Method Flash 5

reverse the order of elements in an array
array.reverse()

Description

The reverse( ) method reverses the order of elements in an array, swapping the last element with the first element, the second-to-last element with the second element, and so on.

Example

myList = new Array(3, 4, 5, 6, 7);
myList.reverse();                      // myList is now [7, 6, 5, 4, 3]

See Also

Array.sort( )


Table of Contents