- Implemented exercises for array high-order methods, memory and execution, switch statements, and final review. - Added starter and answer files for each exercise to facilitate learning. - Created a runner HTML file to execute JavaScript code and display console outputs. - Updated README files to include exercise objectives, tasks, and usage instructions.
48 lines
1.2 KiB
Markdown
48 lines
1.2 KiB
Markdown
# 练习 16:总复习
|
||
|
||
## 目标
|
||
|
||
把基础练习和补充练习里的关键知识点串起来,完成一个真正的总复盘脚本。
|
||
|
||
## 项目名称
|
||
|
||
学习营总复盘器
|
||
|
||
## 你要练什么
|
||
|
||
- 对象和对象方法
|
||
- `this`
|
||
- 数组高阶函数
|
||
- `switch`
|
||
- `break`
|
||
- `undefined` / `null`
|
||
- 引用类型
|
||
- 函数封装
|
||
|
||
## 任务
|
||
|
||
请完成一个控制台版“学习营总复盘器”,要求至少包含:
|
||
|
||
- 一个带方法的 `reviewer` 对象
|
||
- 一个 `lessons` 数组
|
||
- 一个用 `switch` 输出阶段说明的函数
|
||
- 一个用 `for + break` 清洗有效数据的过程
|
||
- 至少两个数组高阶函数
|
||
- 对 `undefined` 和 `null` 的判断
|
||
- 一段对象引用变化的观察代码
|
||
- 最终输出标题、有效课程、平均分、完成状态
|
||
|
||
## 自检标准
|
||
|
||
- 是否把数据、判断、统计拆成了清晰步骤
|
||
- 是否正确使用了 `this`
|
||
- 是否知道什么时候该 `break`
|
||
- 是否能区分 `undefined` 和 `null`
|
||
- 是否能看出对象引用共享带来的变化
|
||
- 输出信息是否完整、可读
|
||
|
||
## 文件
|
||
|
||
- [starter.js](/Users/lijiaqing/home/wwwroot/front-end-example/03-javascript-core/16-final-review/starter.js)
|
||
- [answer.js](/Users/lijiaqing/home/wwwroot/front-end-example/03-javascript-core/16-final-review/answer.js)
|