Learn
Getting Started with JavaScript
Arithmetic Operators
Basic arithmetic often comes in handy when programming. These include the following operators and their corresponding symbols:
- Addition +
- Subtraction -
- Multiplication *
- Division /
- Modulus %
The first four work how you might guess:
The Modulus (%) operator returns the remainder of a division operation.
Example:
Instructions
1.
Print the value 5 + 7 to the console.
2.
Print the value 3 * 2 to the console.
3.
Print the value 7 / 2 to the console.
4.
Print the value 5 % 3 to the console.
Sign up to start coding
Already have an account?
Sign In
Course content
