Recap

Grade 3, page 11 of 11. A one-minute read.

  • Arithmetic operators: +, -, *, /, % (remainder), ** (power).
  • Order of operations: parentheses, then **, then * / %, then + -. When in doubt, use parentheses.
  • number % 2 === 0 checks if a number is even.
  • Shortcuts: x += 5 means x = x + 5. x++ adds one, x-- subtracts one.
  • Comparison operators (>, <, >=, <=, ===, !==) give back true or false.
  • Strings compare alphabetically, but uppercase comes before lowercase, and numbers in strings compare as text.
  • Always use === and !==, never the loose == and !=.
  • Logical operators: && (both true), || (at least one true), ! (flip).
  • The Math object has tools like round, floor, ceil, max, min, abs, sqrt, and random.
  • Random whole number from 1 to max: Math.floor(Math.random() * max) + 1.

Reading is step one

CurlyScript turns these notes into a game: short questions, an explanation after every answer, and a test at the end of each grade. Free, with nothing to sign up for.

Start learning