Chapter 4
Working with Operators and Expressions
IN THIS CHAPTER
Building expressions
Setting values with the assignment operator
Testing with the comparison operators
Doing the math with arithmetic operators
Using your words with the string operators
Thinking through the logical operators
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.