JavaScript Arithmetic Operators

Posted by Prem Tiwari | Updated on

JavaScript Arithmetic Operators: JavaScript Arithmetic Operators includes Addition, Subtraction, Multiplication, Division & Modulus & they are binary operators so they operate on 2 operands.

Read more about JavaScript Tutorial.

JavaScript Arithmetic Operators

The below table shows the Arithmetic Operators in JavaScript with examples:

OperatorDescriptionExampleResults
+Additionresult = x + yresult = 15
Subtractionresult = x – yresult = 5
*Multiplicationresult = x * yresult = 50
/Divisionresult = x / yresult = 2
%Modulusresult = x % yresult = 0
++Incrementresult = x++
result = x
result = ++x
result = 10
result = 11
result = 12
Decrementresult = x–
result = x
result = –x
result = 12
result = 11
result = 10

JavaScript Arithmetic Operators Example


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers