CHAPTER 7

image

JavaScript Operators Reference

In JavaScript, operators perform operations on expressions. The expressions that the operators operate on are called operands. JavaScript supports unary operators (operators that work on one expression, like the increment operator), binary operators (operators that require two expressions, like most mathematical operators), and one ternary operator (which requires three expressions).

Operators in JavaScript can be grouped into seven broad categories:

  • Assignment: Assign values to variables
  • Comparison: Compare values
  • Arithmetic: Perform basic arithmetic—addition, subtraction, modulus, etc.
  • Bitwise: Modify ...

Get JavaScript Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.