length: let arr = [1,2,3]console.log(arr.length); // 数组的长度为3 size(): let s = [1,2,3,4]let arr = new Set(s)console.log(arr); // Set(4) { 1, 2, 3, 4 }console.log(arr.size); //对象的长度为4