JavaScript Arithmetic

JavaScript Arithmetic Operators

Arithmetic operators perform arithmetic on numbers (literals or variables).
<p>A typical arithmetic operation takes two numbers and produces a new number.</p>

<p id="demo"></p>

<script>
var x = 10 + 35;
document.getElementById("demo").innerHTML = x;
</script>
OperatorDescription
+Addition
-Subtraction
*Multiplication
**Exponentiation (ES2016)
/Division
%Modulus (Remainder)
++Increment
--Decrement
A typical arithmetic operation takes two numbers and produces a new number.

Комментарии

Популярные сообщения из этого блога

Code week

CCS Position

CSS Links