统计对象数组的长度,没有length属性,所以不能直接用,记录一下遇到的问题 let arr = Object.keys(对象)//获取到对象的键,是个数组; let length = arr.length;