else if Statements
Checks another condition only when the previous if or else if condition was false.
Understanding else if Statements in JavaScript
What it does: else if is exactly how you check another condition. As soon as one condition is true, the rest are skipped. 'else if' must be written as two separate words with a space. You can have as many else if blocks as needed in a chain. Just like if, else if needs a condition wrapped in ( ). JavaScript is case-sensitive, so 'else' must be lowercase. Like if, else if wraps its code in { }. The block runs when this condition is true and the earlier one wasn't.
Common mistakes: 'else if' needs a space - 'elseif' is not valid syntax. 'else' must be lowercase - a capital E causes an error.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 11–25) and word search (Modules 1–29).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
else ifFill in the Blanks
Spot the Error
Student with a class code? Join your class →