Referencing Array Elements
package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
var trees:Array = ["b", "m", "o", "c"];
var firstTree:String = trees[0];
var favoriteTree:String = trees[2];
trace(firstTree);
trace(favoriteTree);
}
}
}
Related examples in the same category