What you’ll learn
- Arithmetic:
+ - * / % ** - Order of operations (yes, like math class)
- Shortcuts like
+=and++ - Comparing values with
<,>,>=,<= - Why
===beats== - Logic with AND, OR and NOT
- The
Mathtoolbox and random numbers - Two mini projects: a pizza calculator and a dice roller
The pages
Eleven pages, about 14 minutes.
- Arithmetic Operators: Math Class Is Back Don't run away! We promise this is the fun kind of math, where the computer does all the hard work and you just take…
- Order of Operations What's 2 + 3 * 4? If you said 20, Buggsy just got you. The answer is 14. JavaScript follows the same order of…
- Assignment Shortcuts In Grade 1, you learned to update a variable using its own value, like score = score + 10. This is so common that…
- Increment and Decrement: ++ and -- Adding or subtracting exactly one is so common (counting things, moving to the next item, losing a life in a game)…
- Comparison Operators Now for something new. Comparison operators compare two values and give you back a boolean: true or false. These are…
- Equality: Why === Beats == Here's a big one. JavaScript has two ways to check if things are equal. === is strict equality. It checks that both…
- Logical Operators: AND, OR, NOT Sometimes one question isn't enough. You need to combine several. To ride a rollercoaster, you need to be tall enough…
- The Math Object: A Calculator in Your Pocket JavaScript comes with a built-in toolbox called Math, packed with useful math functions. You use them by writing Math…
- Mini Project 1: The Pizza Party Calculator You're throwing a party. Each pizza has 8 slices, and each guest will eat 3 slices (realistically, more, but let's be…
- Mini Project 2: The Dice Roller Let's roll two dice, add them up, and check for doubles. Run this several times. You'll get different results each…
- Recap The key ideas of Grade 3, JavaScript operators, on one page. Arithmetic operators: +, -, , /, % (remainder), *…
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.