➕ Operators for Kids

Operators are the math (and logic) symbols code uses.

Math Operators

You already know these from school: + add, - subtract, * multiply, / divide. Code uses the same symbols, with one twist: * means times, not ×.

Comparing Things

Sometimes we want to ask: "is this bigger than that?" Code uses:

  • > bigger than
  • < smaller than
  • === exactly equal to

And, Or, Not

For yes/no questions: && means "and," || means "or," ! means "not."

🎯
Try this!

Now you try! Is 5 > 3 true or false? What about (5 > 3) && (2 > 10)?

👨‍👩‍👧
For grown-ups

Parent/teacher tip: Compound boolean expressions are tricky. Lots of small examples help.