Javascript Operators

JavaScript Operator:-   When, we perform specific operation on operand with the help of operator.

Example of JavaScript :  int  a+b;

In the above Example, we have a and b Operand, ‘+’ is the arithmetic operator.

We classified the operators in different type such as :-

Arithmetic Operator :- 

Arithmetic Operators :-

+ Plus

– Minus

* Multiplicaiton

/ Division

% Modulus Operator

Example :-    

Addition 

var a=5,b=7;

var sum;

sum=x+y;  Result :-    12

Subtraction

var x=5,y=7;

var diff;

diff=y-x;                 Result :   2

Multiplication 

var x=5,y=7;

var product;

product=x*y;          Result :  35  

Division

var x=5,y=7;

var div;

div=y/x;                Result :    1

Modulus

var x=5,y=7;

var mod;

mod =y%x;        Result :      2




Follow Us

Contact Us

tutorialworldin@yahoo.com

Back to Top