var myCars = new Array();
myCars[0] = "Saab";
myCars[1] = "Volvo";
myCars[2] = "BMW";
var myCars = new Array("Saab","Volvo","BMW");
var myCars = ["Saab","Volvo","BMW"];
數組的屬性數組
屬性函數 |
描述spa |
constructorprototype |
返回對建立此對象的數組函數的引用。code |
length對象 |
設置或返回數組中元素的數目。blog |
使您有能力向對象添加屬性和方法。get |