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.
2 + 2
2 * 2 + 2
+ 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
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.
Follow the link for next video:
Follow the link for previous video: