Chapter 4

Working with Operators and Expressions

IN THIS CHAPTER

Bullet Building expressions

Bullet Setting values with the assignment operator

Bullet Testing with the comparison operators

Bullet Doing the math with arithmetic operators

Bullet Using your words with the string operators

Bullet Thinking through the logical operators

Bullet Learning about additional operators

“But do your work, and I shall know you.”

—RALPH WALDO EMERSON

JavaScript operators and expressions are the building blocks of JavaScript programs. With operators and expressions, you can perform math, compare values, set and change variables, and much more.

In this chapter, you'll learn about JavaScript's operators and use them to build expressions and statements. You'll also learn how to combine operators and how to choose which operators to use when multiple ...

Get JavaScript All-in-One For Dummies 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.