This commit is contained in:
rou
2026-03-19 15:17:29 +08:00
parent 81004b437c
commit 3afbee1535
14 changed files with 190 additions and 6 deletions

View File

@@ -4,3 +4,13 @@ const topics = ["HTML", "CSS", "JavaScript"];
// 1. 往 topics 里新增一个主题
// 2. 输出 topics 的长度
// 3. 用循环输出每一项
/*- 创建一个包含 3 个学习主题的数组
- 新增 1 个学习主题
- 输出数组长度
- 依次输出每个学习主题*/
topics.push('Vue')
console.log(topics.length);
for (let i = 0; i < topics.length; i++) {
console.log(topics[i]);
}