Read the data from an array using array-access notation to access one element at a time.
package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
var aEmployees:Array = ["A", "P", "C", "H"];
trace(aEmployees[0]); // Displays: A
trace(aEmployees[1]); // Displays: P
trace(aEmployees[2]); // Displays: C
trace(aEmployees[3]); // Displays: H
}
}
}
Related examples in the same category