JavaScript
Exercise 2 / 15
if/else Conditions
Easy
12 points
Create an if/else condition that displays "Adult" if age >= 18, otherwise "Minor".
if/else conditions allow executing code conditionally. if (condition) executes code if condition is true, else executes alternative code. Comparison operators (==, ===, <, >, <=, >=) compare values. This is fundamental for programming logic.
Well done! 🎉
Your answer is correct! You earned 12 points.
Not quite...
Try again! You can do it.
Your code
JavaScript
Result