- 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.
755 B
755 B
练习 13:数组高阶函数
目标
学会使用数组高阶函数处理一组数据。
你要练什么
map()filter()reduce()find()some()every()
任务
请完成一个“学习成绩分析”脚本,要求:
- 用
map生成带单位的新数组 - 用
filter找出及格成绩 - 用
reduce计算总分 - 用
find找出第一条大于等于 90 的成绩 - 用
some判断是否有人不及格 - 用
every判断是否全部完成考试