What is JavaScript Operators

JavaScript |
function gfg() {
    let val1 = 5;
    // Equality Operators
    document.write(val1 == 5);
    document.write("
"); // Relational Operators document.write(val1 > 0); } gfg();
Output
true
true

An operator is capable of manipulating a certain value or operand. Operators are used to perform specific mathematical and logical computations on operands. In other words, we can say that an operator operates the operands. In JavaScript operators are used for compare values, perform arithmetic operations etc.

  • Arithmetic Operators
  • Comparison Operators
  • Logical Operators
  • Assignment Operators
  • Ternary Operators
  • typeof Operator