Arithmetic Operations

Learn about the arithmetic operation with examples.

Most programming languages can carry out all the usual arithmetic operations—just like a pocket calculator. Calculations can be set out as we would expect, and they often use the operators and symbols we’re familiar with. JavaScript is no exception. Let’s try doing some math in the below widget.

Addition

Addition uses the + operator, as we would expect:

Get hands-on with 1200+ tech skills courses.