Table of Contents
1. Assignment operators
Assignment operators assign a specified value to the variable on their left. The simplest assignment operator is the equal operator (=). For example, the statement x=f() assigns the value f() to the variable x.
2. Comparison Operators
3. Arithmetic Operators
4. Bitwise Operators
5. Logical Operators
Boolean operators are used with Boolean values and return a Boolean value.
These operators allow the programmer to check various conditions in programs and perform logical operations such as AND, OR, and NOT.
6. BigInt operator
Using these operators, you can perform addition, subtraction, multiplication, division, exponentiation, and other mathematical operations on BigInt numbers.
7. String Operator
8. Conditional Operator
The conditional operator evaluates the value placed in the condition section. If the condition is true (TRUE), the value value 1 is assigned to the variable. Otherwise (the condition is FALSE), value2 is assigned to the variable.
9. Comma Operator
The comma operator first evaluates `expression1′ and then goes to `expression2′ and evaluates it, and so on until the end of the expression. The value of the last `expression’ in this chain is considered the overall result of this expression.
10. Unary Operators
1. The delete operator
Here, `object’ indicates the object on which you want to perform the delete operation. `property’ is the name of the property you want to remove, and `index’ is the position of the element you want to remove from the object.
2. typeof operator
The result of the typeof operator returns a string as output that represents the data type. Some possible results include:
- “string” for strings,
- “number” for numbers,
- “boolean” for boolean values (true and false),
- “object” for objects and arrays,
- “undefined” for variables that are not initialized,
- “function” for functions,
- “Symbol” for symbols.
3. Void operator
4. This operator
5. Operator new