Locked lesson.
About this lesson
How to add, subtract, multiply, and divide with JavaScript. We'll also look at the modulus, incrementing and decrementing.
Exercise files
Download this lesson’s related exercise files.
Arithmetic Operators.docx58.7 KB Arithmetic Operators - Solution.docx
58.9 KB
Quick reference
Arithmetic Operators
Math operators are very useful to computer programming.
When to use
Any time you want to do any sort of math, you'll use arithmetic operators.
Instructions
The main math operators are:
+ // addition
- // subtraction
* // multiplication
/ // division
** // exponents
% // modulus
++ // increment
-- // decrement
Hints & tips
- Math operators act exactly how you'd expect them to.
- Remember to use the correct order of operations!
Lesson notes are only available for subscribers.