O'Reilly logo

JavaScript Step by Step by Steve Suehring

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Using Operators and Expressions

After reading this chapter, you'll be able to

  • Understand the operators available in JavaScript.

  • Use JavaScript operators to perform math, assignments, relational tests, and equality tests.

  • Use the void operator to open a new window through a link.

Meet the Operators

The ECMA-262 standard defines assorted operators of various forms. These include:

  • Additive operators

  • Multiplicative operators

  • Bitwise operators

  • Equality operators

  • Relational operators

  • Unary operators

  • Assignment operators

Operators can be used both on literal values, like the number 10, and on variables and other objects in JavaScript.

Additive Operators

The term additive operators includes both addition and subtraction operators. It seems a bit of a misnomer, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required