Files
front-end-example/03-javascript-core/10-final-mini-app/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

21 lines
377 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 student = {
name: "林晨",
stage: "JavaScript 核心",
};
const scores = [78, 85, 92];
function getAverageScore(list) {
// 计算平均分
}
function getLevel(average) {
// 返回等级
}
// 任务:
// 1. 计算平均分
// 2. 计算等级
// 3. 输出姓名、阶段、平均分、等级
// 4. 如果平均分 >= 80输出“可以进入下一阶段”