JavaScript provides various types of operators to perform different operations. Here are some of the most commonly used operators:
+
: Addition-
: Subtraction*
: Multiplication/
: Division%
: Modulus (Remainder)++
: Increment--
: Decrement
==
: Equal to===
: Strict equal to!=
: Not equal to!==
: Strict not equal to>
: Greater than<
: Less than>=
: Greater than or equal to<=
: Less than or equal to
&&
: Logical AND||
: Logical OR!
: Logical NOT
=
: Assignment+=
: Addition assignment-=
: Subtraction assignment*=
: Multiplication assignment/=
: Division assignment%=
: Modulus assignment
&
: AND|
: OR^
: XOR~
: NOT<<
: Left shift>>
: Right shift>>>
: Zero-fill right shift
condition ? expr1 : expr2
typeof
: Returns the type of a variableinstanceof
: Returns true if an object is an instance of an object type