Your files never leave your device
Advertisement

Booleans & Comparisons

Booleans are simple: they are either true or false. They are the foundation of logic in your code.

Comparison Operators

We generate booleans by comparing things. Always use === (strict equality) instead of == to avoid weird type conversions.

Try It Yourself

        

Logical Operators

You can combine conditions using AND (&&), OR (||), and NOT (!).

Try It Yourself

        

Practice

Challenge 1: Write an expression that checks if a number n is between 10 and 20.

Related Guides

Sponsored Utility
While You're Here
Sponsored Recommendations
Advertisement