JavaScript Arithmetic Operator With Example
JavaScript Operators Definition:
An operator that performs some operation on single or multiple operands and produces a result is called Operators.
An Operators are symbols or keyword that enable JavaScript to perform some sort of actions.
Arithmetic Operators
An Arithmetic operators are an operator which is used to perform mathematical operations between numeric operands.
Operator | Description |
---|---|
+ | Adds two numeric operands. |
- | Subtract right operand from left operand |
* | Multiply two numeric operands. |
/ | Divide left operand by right operand. |
% | Modulus operator. Returns remainder of two operands. |
++ | Increment operator. Increase operand value by one. |
-- | Decrement operator. Decrease value by one. |
Example :
Result:
14 6 40 2.5 2
Read Also:
- JS-Comparison Operators
- JS-Increment Decrement Operator
- JS-Logical Operators
- JS-Conditional Operators (or) ternary Operator
- JS-Bitwise Operator
- JS-Increment Decrement Operator