Fundamentals·medium 18 min 75 XP
Grade Calculator
Convert a numeric score (0-100) into a letter grade: A (90+), B (80+), C (70+), D (60+), else F.
Examples
- gradeCalculator(95) → "A"
- gradeCalculator(72) → "C"
- gradeCalculator(40) → "F"
Constraints
- Keep the required function name so the tests can find it
- Return a value instead of only logging it
- Do not mutate inputs unless the challenge asks you to
Grade Calculator · editor
Code runs in an isolated Web Worker with a 3-second timeout — no DOM access, and it can never hang the page.