第 13 课 · Web前端技术 6 / 22 | 编码:L13-09a
数组与遍历

数组:把多个值按顺序放在一起

先认识数组,再学习 for...of。数组从索引 0 开始计数,length 表示元素数量。

const students = ["小林", "小周"];
students.push("小吴");
console.log(students.length); // 3
console.log(students[1]);     // 小周