JavaScript Operators

Notes:

JavaScript Operators

Expression:
A valid combination of operators and operands is known as an expression, on evaluation it yields a result. An expression contains two elements, they are operators and operands.
Ex:
Valid Expressions:
2 + 2
2 * 2 + 2

Invalid Expressions:
+ 2 2
* + 2 * + 2

Operator: is going to perform an operation on the given operand(s).
Types of operators:
Operators in any programming language are broadly categorized into :

Unary Operators: accept only one operand.
Binary Operators: accept two operands.
Ternary Operators: accept three operands
Types of JavaScript Operators:
L – Logical Operators : (&&, || , !)
A – Arithmetic Operators : (+, -, *, /, %)
R – Relational Operators : (<, >, <=, >=, ==, !=, ===, !==)
A – Assignment Operators : (= , SHA/AA: (+=, -=, *=, /=))
B – Bitwise Operators : (&, |, ~, ^, <<, >>)
I – Increment and Decrement Operators : (++ , --)
C – Conditional Operator : (?:)
S – Special Operators : typeof, new, delete, comma etc.

Interview Questions: