34,333
edits
Changes
→Arithmetic Operators
== Arithmetic Operators ==
As you might expect, arithmetic operators perform mathematical calculations on both values, and the values assigned to variables. JavaScript arithmetic operators consis of a value to the right and left of the operator. For example:
<pre>
y = 2 + 5;
</pre>
adds the value of 2 to the value of 5 and assigns the result (7 in this case) to the variable ''y''.