Introduction to JS
Introduction Of Javascript
These operators are those symbols which is used to perform operations on operands.And here in Js we are having mainly 6 types of operators which are as follows :-
Js Arithmetic operators
It helps in performing the arithmetic operations onto the operands.
Some of the arithmetic operators are as follows:-
Operator | Description |
---|---|
+ | Addition |
- | Subtraction |
* | Multiplication |
/ | Division |
% | Modulus (Remainder) |
++ | Increment |
-- | Decrement |
Js Comparison operators
It helps in comparing the operands.
Some of the comparison operators are as follows:-
Operator | Description |
---|---|
== | Is equal to |
=== | Identical (equal and of same type) |
!= | Not equal to |
!== | Not Identical |
> | Greater than |
>= | Greater than or equal to |
< | Less than |
<= | Less than or equal to |
Js Bitwise operators
It helps in performing the bitwise operations onto the operands.
Some of the bitwise operators are as follows:-
Operator | Description |
---|---|
& | Bitwise AND |
| | Bitwise OR |
^ | Bitwise XOR |
~ | Bitwise NOT |
<< | Bitwise Left Shift |
>> | Bitwise Right Shift |
>>> | Bitwise Right Shift with Zero |
Js Logical operators
It helps in performing the logical operations onto the operands.
Some of the logical operators are as follows:-
Operator | Description |
---|---|
&& | Logical AND |
|| | Logical OR |
! | Logical Not |
Js Assignment operators
It helps in assigning operations onto the operands.
Some of the assignment operators are as follows:-
Operator | Description |
---|---|
= | Assign |
+= | Add and assign |
-= | Subtract and assign |
*= | Multiply and assign |
/= | Divide and assign |
%= | Modulus and assign |
Js Special operators
It helps in performing the special operations onto the operands.
Some of the special operators are as follows:-
Operator | Description |
---|---|
(?:) | return value based on conndition |
delete | delete operators |
instanceof | checks if the object is an instance of given type |
typeof | checks the type of object. |
yield | checks what is returned in a generator by the generator's iterator. |
JS training insitute | Best IT Training classes in Gurgaon | Web Designing Training Institute