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.
This commit is contained in:
charlie
2026-03-13 11:09:19 +08:00
parent 4495ae0e28
commit 877acb5a8f
51 changed files with 1949 additions and 5 deletions

View File

@@ -0,0 +1,30 @@
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. 输出最终结果