嗨,我想在我的 javascript 函数中使用嵌套数组,但它不起作用。这是我的功能:
var arr = [];
function test(id, value){
arr.push(new Array("id" = id, "value" = value));
}
所以当你发现我想创建这样的东西时:
arr[0][id = "example0", value = "value0"];
arr[1][id = "example1", value = "value1"];
arr[2][id = "example2", value = "value2"];
...