Comparison Chain
Predict Output Easy
Question
What does this code print?
Code
let x = 7;
console.log(x > 5 && x < 10);
Hint
Both conditions must be true for &&.
Explanation
x is 7. x > 5 is true (7 > 5). x < 10 is true (7 < 10). true && true is true. The output is: true. This checks whether x is in the range (5, 10).
Related Resources
Related Lessons
- Conditions (if/else)
Learn how if/else conditions work.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.