Arithmetic Operatos in JavaScript

There are following arithmetic operators which JavaScript supports.

JavaScript Arithmetic Operators

Arithmetic operator are basically used to perform arithmetic operations on numbers.

Operator Description
+ Addition
- Subtraction
* Multiplication
** Exponentiation
/ Division
% Modulus (Division Remainder)
++ Increment
-- Decrement

Example of Subtracting

The (-) operator is used for subtraction.

var a = 6;
var b = 3;
var c = a - b;


Example of Adding

The (+) operator is used for addition.

var a = 6;
var b = 3;
var c = a + b;


Example of Multiplying

The (*) operator is used for multiplication.

var a = 6;
var b = 3;
var c = a * b;


Example of Dividing

The (/) operator is used for dividing.

var a = 6;
var b = 3;
var c = a / b;


Example of Remainder

The (%) operator is used for division remainder.

var a = 6;
var b = 3;
var c = a % b;








The Best

Comment here

If you have any query, if you want to know something about any of technical course related to computer science field, if you have any suggestion about relevant to uploaded content or if you anything wrong here (any mistake in content) than please contact us. Keep in mind, comment should be according to community guidelines.