Arithmetic Operators

👨‍💼 Great! You can now perform calculations in JavaScript.
🦉 Some things to note:
  • Division always returns a decimal in JavaScript (no integer division)
  • The modulo operator (%) is great for checking if a number is even or odd: number % 2 === 0 means it's even
  • You can combine operators: (a + b) * c
JavaScript follows the standard order of operations (PEMDAS): Parentheses, Exponents, Multiplication/Division, Addition/Subtraction. Use parentheses to be explicit about order!

Please set the playground first

Loading "Arithmetic Operators"
Loading "Arithmetic Operators"