Files
front-end-example/03-javascript-core/16-final-review/starter.js
charlie 877acb5a8f feat: Add JavaScript core exercises and solutions
- 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.
2026-03-13 11:09:19 +08:00

31 lines
857 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const reviewer = {
name: "林晨",
stage: "final-review",
showTitle() {
// 输出总复盘标题
},
};
const lessons = [
{ title: "变量", score: 80, finished: true },
{ title: "闭包", score: 92, finished: true },
{ title: "this", score: 87, finished: true },
{ title: "补漏练习", score: null, finished: false },
{ title: "综合回顾", score: 95, finished: true },
];
let mentorNote;
const reviewComment = null;
function getStageText(stage) {
// 用 switch 返回阶段说明
}
// 任务:
// 1. 调用 reviewer.showTitle()
// 2. 输出 mentorNote 和 reviewComment 的区别
// 3. 用 for + break 提取 lessons 中 score 有效的项目
// 4. 用高阶函数统计课程标题、完成状态和平均分
// 5. 创建 reviewerAlias 指向 reviewer修改 stage观察原对象是否变化
// 6. 输出最终结果