Array.reverse( ) Method

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
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( )

     



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net