The Grade Counselor
Easy+15 XP
Mission Briefing
The Guild's training academy needs a system to automatically grade squires based on their trial scores. The current manual grading takes weeks!
The Concept: Branching Logic
When a decision isn't just a simple true/false, but relies on a flowing cascade of conditions, we use an else if ladder. The code checks each condition from top to bottom and executes the first one that is true.
The Objective
Your function receives a numeric score. Return a string grade based on this ladder:
- 90 or above: Return "A"
- 80 or above: Return "B"
- 70 or above: Return "C"
- Strictly below 70: Return "F"
01EXAMPLE 1
Input
score = 85Output
"B"Constraints
FundamentalsControl Flow
JavaScriptSystem handles I/O — write your function only
Loading...
3 Hidden
Input Arguments
score85
Expected Output
B
Click RUN to test your solution