Binary operators required two operands, one before and one after operator.
Unary operators required only one operand, either before or after operator.
An Arithmetic operator is used to perform Arithmetic operations between values. Like Addition, Subtraction, Multiplication, Division etc
|%||Modulus, check reminder||6%3=0|
|++||Increment, y++ means y = y+1||var y=2; ++y; y=3|
|--||Decrement, y-- means y = y-1||var y=2; --y; y=1|
Logical Operators are used to check logic between two operators. and (&&), or (||) and not (!) are logical operators.
|&&||and, when both are correct||2 < 5 && 2> 1 is true|
|||||or, when any one is correct||var x=2, 2>5 || x==2 is true|
|!||not||!(2==3) is true|
|=||Assignment||x=2; means x is 2|
|+=||Addition Assignment||var x=2; x+=2 means x=x+2|
|-=||Subtraction Assignment||var x=2; x-=2 means x=x-2|
|*=||Multiplication Assignment||var x=2; x*=2 means x=x*2|
|/=||Division Assignment||var x=2; x/=2 means x=x/2|
Comparision operators are used in a statement to compare two values.
|==||Equal to||2=="2" is true|
|===||Strict equal to||2==="2" is false|
|!=||not equal||2!=1 is true|
|!==||not strict equal||2!=="2" is true|
|>||greater than||2> 5 is false,
& 2 <5 is true
|>=||greater than or equal to||3>=3 is true|
|<||less than||1< 3 is true|
|<=||less than or equal to||2<=2 is true|