JAVA SCRIPT OPERATORS
An operator is used to transform one or more values into single resultant value.The value to which the operator is applied is referred to as operand.
There are so many operators are there in java script.
- Arithmetic operators
- Comparison operator
- Logical operator
- String operators
- Assignment operators
- Ternary operators
- Special operators
Arithmetic operators:
- + : Add
- * : Multiply
- % : Modules
- - : Sub
- -- : Return the value than decrement
- & : Division
- ++ : Return the value than increment
Comparison operator:
- == : equal
- === : strictly equal
- != : not equal
- !== : strictly equal
- < : less than
- <= : less than or equal to
- > : greater than
- > = : greater than or equal to
Logical operator:
- && : AND
- || : OR
- ! : NOT
String operators:
- +
EX:"ab"+"cd"="abcd"
Assignment operators:
- =
- +=
- -=
- *=
- /=
- %=
Ternary operators:
java script supports the conditional expression operator,the format for a conditional expression is condition?value1:value2.
ex:(x>y)?5:7
Special operators:
- New operator
- Delete operator
- The void operator
- comma operator
0 Comments