0 of 10 problems solved • 0%
Use in a course

Exercise prompt

Choose with else if

Use else if when a program needs more than two possible branches. Conditions are checked from top to bottom, and the first matching branch runs.

Example

if (score >= 8) { console.log("Great"); } else if (score >= 5) { console.log("Good"); } else { console.log("Keep trying"); }

Your task

Complete the missing middle branch so a score of 75 displays Grade: Pass. Scores of 90 or more are excellent; scores below 60 need practice.

Hint

Try the boundary scores 59, 60, and 90 against your branch order.