标签: javascript arrays
var arr = []; console.log(arr); //output: [] arr.length = 5; console.log(arr); //output: [,,,,] arr.length = 2; console.log(arr); //output: [,]
数组的length属性如何工作?数组如何知道属性已更改?
length