- 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.
15 lines
433 B
JavaScript
15 lines
433 B
JavaScript
const scores = [58, 76, 91, 84];
|
|
const students = [
|
|
{ name: "小周", finished: true },
|
|
{ name: "小林", finished: true },
|
|
{ name: "小陈", finished: false },
|
|
];
|
|
|
|
// 任务:
|
|
// 1. 用 map 生成 ["58分", ...]
|
|
// 2. 用 filter 筛出及格分
|
|
// 3. 用 reduce 计算总分
|
|
// 4. 用 find 找到第一个 >= 90 的分数
|
|
// 5. 用 some 判断是否存在不及格
|
|
// 6. 用 every 判断 students 是否都 finished 为 true
|