首页 > 代码库 > JS 数组

JS 数组

这三种写法是等价的:

var myArray = new Array();myArray[0] = "a";myArray[1] = "b";myArray[2] = "c";
var myArray = new Array("a","b","c");
var myArray = ["a","b","c"];