View comments | RSS feed

reverse (Array.reverse method)

public reverse() : Void

Reverses the array in place.

Availability: ActionScript 1.0; Flash Player 5

Example

The following example uses this method to reverse the array numbers_array:

var numbers_array:Array = new Array(1, 2, 3, 4, 5, 6);
trace(numbers_array); // Displays 1,2,3,4,5,6.
numbers_array.reverse();
trace(numbers_array); // Displays 6,5,4,3,2,1.

Version 8

Comments


mbd said on Feb 15, 2006 at 10:35 AM :
The Void return definition is incorrect. The reverse method actually returns the Array in question. This also includes the class file, which indicates Void, yet it REALLY does return the Array.

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/8/main/00001912.html