Operators and expressions
Operators and expressions
Arithmetic operators perform calculations; comparison operators return booleans. Use strict equality (===) to avoid unexpected type coercion. Logical operators combine conditions, and the conditional operator selects between expressions.
Try it yourself
Change the example, run it, and explain the result in your own words. Then create one variation of your own.
Key idea
Use the example as a starting point, not something to memorize. Practise, inspect the result and make small improvements.
Code example
const age = 20;
const canJoin = age >= 18 && age < 100;
console.log(canJoin);