The length property of an array returns the number of elements in the array.
package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
var aEmployees:Array = ["A", "P", "C", "H"];
for(var i:Number = 0; i < aEmployees.length; i++) {
trace(aEmployees[i]);
}
}
}
}
Related examples in the same category