Learn to code JavaScript

Arithmetic Operators

Arithmetic operators are used to perform arithmetic on numbers.

Examples:

• var add = 2 + 3

• var substract = 5 - 2

• var multiply = 3 * 5

• var divide = 10 / 2

Print the output of the sum of 2 and 2 using console.log(). If you get stuck, head to the previous lesson to learn how to use console.log.

Print the output of 5 * 5.

Console: