var arr = new Array(); arr[0] = '123'; arr[1] = '456'; console.log(arr.length); var arr1 = new Array(); arr1['x0sdfdsfd'] = '123'; arr1['xsdfsd1'] = '456'; console.log(arr1.length);
输出:
2
0
[Finished in 0.2s]
声明:本站所有文章和图片,如无特殊说明,均为原创发布。商业转载请联系作者获得授权,非商业转载请注明出处。