Operators in JavaScripts

JavaScript operators are symbols that are used to perform operations on operands.

There are some types of operators in JavaScript.

  1. Arithmetic Operators

  2. Comparison Operators

  3. Bitwise Operators

  4. Logical Operators

  5. Assignment Operators

Arithmetic Operators

Arithmetic operators are used to perform arithmetic operations on the operands.

example: +, -, *, /

Comparison Operators

The JavaScript comparison operator compares the two operands.

example: == is equal to,

!= not equal to,

Bitwise Operators

The bitwise operators perform bitwise operations on operands.

example: & and

| or

~ not

Logical Operators

Logical operators are used to determine the logic between variables or values.

example: && logical and

|| logical or

Assignment Operators

Assignment operators assign values to JavaScript variables.

example: +=, -= ,*=, /=