Java Script / Java Script Operators

An operator is a symbol that tells the compiler to perform specific mathematical or logical functions. Java Script is rich in built-in operators. Java script operator types were

1. Arithmetic Operators
2. Assignment Operators
3. Logical Operators
4. Comparison Operators

Arithmetic Operators
Operator Description
+ Addition
- Subtraction
* Multiplication
/ Division
% Modulus (Gives Remainder)
++ Increment
-- Decrement

Assignment Operators
Operator Description Same As
= x = y x = y
+= x += y x = x + y
-= x -= y x = x - y
*= x *= y x = x * y
/= x /= y x = x / y
%= x %= y x = x % y

Logical Operators
Operator Description Output
&& logical and True / False based on condition
|| logical or True / False based on condition
! logical not True / False based on condition

Comparison Operators
Operator Description Output
== equal to True / False based on condition
!= not equal to True / False based on condition
> greater than True / False based on condition
< less than True / False based on condition
>= greater than or equal to True / False based on condition
<= less than or equal to True / False based on condition
?: ternary operator True / False based on condition



Home     Back