var arr = []; arr[-1] = -11; arr[9] = 99; console.log(arr.length);//长度为10 ??? console.log(arr[2]);//undefined for(var k in arr){ if (arr.hasOwnProperty(k)){ console.log(arr[k]); } }//99 //-11
添加回答
举报
0/150
提交
取消