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 completing this chapter, you will be able to

  • Understand the operators available in JavaScript.

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

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

Meet the operators

The ECMA-262 specification defines assorted operators of various forms. These include the following:

  • Additive operators

  • Multiplicative operators

  • Bitwise operators

  • Equality operators

  • Relational operators

  • Unary operators

  • Assignment operators

  • The comma operator

Operators can be used both on literal values, such as the numeral 10, and on variables and other objects in JavaScript.

Additive operators

The term additive operators includes both addition and ...

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