var arr = []; arr["a"] = 1; arr["b"] = 2; arr["c"] = 3; // 此时长度为0:在键为字符串的时候length长度不增加 arr[8] = 4; // 此时长度为9:因为最大的非字符串键是8所以长度为9