Adding New Elements with the length Variable
package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
var colors = ["green", "red", "blue"];
colors.length = 50;
trace(colors); // green,red,blue,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
}
}
}
Related examples in the same category