Definition and type of operators in JavaScript

What are JavaScript operators

A JavaScript operator is a symbol or a word that performs a calculation, comparison, or assignment on one or more values. JavaScript operators do much of the work in script. There are many types of JavaScript operators.

Operator Types in JavaScript

There are six types of operators:

  • Mathematical – Mathematical operators perform mathematical calculations on two values.
  • Assignment – Assignment operators assign new values to variables.
  • Comparison – Comparison operators are used to compare two values, two variable, etc.
  • Logical – Logical operators compare two conditional statements, determin if the result is true, and proceed accordingly.
  • Bitwise – Bitwise operators operate at the bit level.
  • Special – Special operators perform special functions.

Leave a Reply