# JavaScript Tutorial : Introduction to operators in JavaScript - Javascript Arithmetic Operators

Introduction To Operators in JavaScript
1→ Arithmetic Operators
2→ Comparison Operators
3→ Logical Operators
4→ Assignment Operators
5→ Condition Operators

Arithmetic Operators :

Operators   Description         Example
+                   Addition             var c = a + b;
-                    Subtraction        var c = a - b;
*                   Multiplication    var c = a * b;
/                    Division             var c = a / b;
%                  Modulus             var c = a % b;
++                 Increment           var c = ++a;
–                    Decrement         var c = -- a;

Examples on Arithmetic Operator :

```<html>
<body>
<script >
var b = 10,c = 15;
var a = b + c;
document.write(a);
</script>
</body>
</html>
```
Output : 25

Subtraction Example:-
```<html>
<body>
<script >
var b = 10,c = 5;
var a = b - c;
document.write(a);
</script>
</body>
</html>
```
Output : 5

Multiplication Example:-
```<html>
<body>
<script >
var b = 2,c = 3;
var a = b * c;
document.write(a);
</script>
</body>
</html>
```
Output : 6

Division Example:-
```<html>
<body>
<script >
var b = 10,c = 5;
var a = b / c;
document.write(a);
</script>
</body>
</html>
```
Output : 2

Modulus Example:-
```<html>
<body>
<script >
var b = 10,c = 5;
var a = b % c;
document.write(a);
</script>
</body>
</html>
```
Output : 0

Increment Example:-
```<html>
<body>
<script >
var b = 10,c = 5; var a = ++b;//pre-increment b++;//post-increment
var e =b;
document.write(a);
document.write('<br>'); //using HTML code
document.write(e);
</script>
</body>
</html>
```
Output : 11
12

Decrement Example:-
```<html>
<body>
<script >
var b = 10,;
var a = --b;
document.write(a);
</script>
</body>
</html>
```
Output : 9

JavaScript Introduction Part 1 : Checkout : Part 1

JavaScript Introduction Part 2 : Checkout : Part 2

JavaScript Introduction Part 3 : Checkout : Part 3