# 章序号/节序号/节/笔记序号 codecademy,array # 概念阐释 - 同其他变量一样,数组有很多方便的内置对象可以使用。 - `.length` 返回数组数量 # 举例子 ```js const newYearsResolutions = ['Keep a journal', 'Take a falconry class']; console.log(newYearsResolutions.length);// Output: 2 ``` - 与push不同,因为直接得出数组长度?而且是属性,其他都是方法。 # 类比、比较与对比 # 问题 计算数组元素数量 ```js const objectives = ['Learn a new language', 'Read 52 books', 'Run a marathon']; ``` # 问题答案 ```js const objectives = ['Learn a new language', 'Read 52 books', 'Run a marathon']; console.log(objectives.length); ``` # 备注(经验集/错误集) ## 经验集 ## 错误集 ## 参考资料