If/Else Statements
Conditional statements let your code make decisions based on conditions.
Basic if Statement
Loading JavaScript Playground...
if...else
Loading JavaScript Playground...
if...else if...else
Loading JavaScript Playground...
Multiple Conditions
Loading JavaScript Playground...
Nested if Statements
Loading JavaScript Playground...
Exercise: Age Category
Categorize a person by age:
Loading JavaScript Exercise...
Exercise: Number Sign
Determine if a number is positive, negative, or zero:
Loading JavaScript Exercise...
Up next · Lesson 15 of 37
Switch Statements
1 min read
14 of 37 lessons done

Ask Byte about this lesson
A private chat about this lesson. Byte has read the whole lesson, answers in seconds, and shows the section each answer comes from. Ask follow-ups in any language.
Questions & Answers
Public questions about this lesson. The AI Tutor answers right away in your language, the FreeAcademy team checks answers, and every learner can read them.

