Operator Types

Topic

Operator types in Javascript?

Explanation

An operator is a symbol or sign used in javascript to identify a specific operation.
For example, when we want to define an expression for adding two numbers, we use 3+4. Here let us assume that we have defined variable a and b for the number, so the expression will become a+b; The symbol "+" defines that the operands a and b has to be added. So "+" is called as an operator.
Types:
There a three type of operators based on operands used, namely unary, binary, ternary.
Unary - This works with one operand (e.g: a++, a will be incremented by 1),
Binary - This works with two operands (e.g: a+b),
Ternary - This works with three operands (e.g: condition? value 1 : value 2).

There a four type of operators based on the type of use.
Arithmetic Operator
Logical Operator
Comparison Operator
Assignment Operator