Chapter 5

JavaScript Operators

Key Skills & Concepts

   Understanding the Operator Types

   Understanding Arithmetic (Mathematical) Operators

   Understanding Assignment Operators

   Understanding Comparison Operators

   Understanding Logical Operators

   Understanding Order of Operations

Operators do much of the work in scripts. In the previous chapters, you have seen examples of the use of the assignment (=) and addition (+) operators. JavaScript offers many other types of operators to perform various operations.

This chapter begins by giving you an introduction to the different types of JavaScript operators. Then, you will learn about each operator and its use in scripts. Finally, you will learn about the order of precedence for operators, ...

Get JavaScript: A Beginner's Guide, Fifth Edition, 5th Edition 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.