Page 129 - CITS - Computer Software Application -TT
P. 129
COMPUTER SOFTWARE APPLICATION - CITS
Unary Operators:
1 Increment operators (++): JavaScript uses an increment operators ( ++ ) to increasing the value of variable
with ( + 1 ).
Increment Operators are two types:
i Pre- Increment operator (++a): It is use for increasing value before use of variable.
ii Post- Increment operator (a++): It is use for increasing value after use of variable.
2 Decrement operators (--): JavaScript uses an decrement operators ( -- ) to decreasing the value of variable
with ( - 1 ) .
i Pre- decrement operator (++a): It is use for decreasing value before use of variable.
ii Post- decrement operator (a++): It is use for decreasing value after use of variable.
Comparison Operators: JavaScript uses an comparison operators to compare values between two variables.
There are many type of comparison operators:
• Greater than(>)
• Greater than and Equal(>=)
• Smaller than(<)
• Smaller than and Equal(<=)
• Equal to(==)
• Equal to & Type(===)
• Not Equal to(!=)
• Not Equal to and Type(!==)
Logical Operators: JavaScript uses an Logical operators to compare and given a boolean value.
There are three types of Logical operators:
• Logical AND (&&)
• Logical OR ( | | )
• Logical NOR ( ! )
Types of JavaScript Operators
There are different types of JavaScript operators:
• Arithmetic Operators
• Assignment Operators
• Comparison Operators
• String Operators
• Logical Operators
• Bitwise Operators
• Ternary Operators
• Type Operators
116
CITS : IT&ITES - Computer Software Application - Lesson 37 - 46