Chapter 3
Building Expressions
IN THIS CHAPTER
Understanding what expressions are
Figuring out numeric expressions
Tying up string expressions
Getting the hang of comparison expressions
Learning about logical expressions
It’s not at all important to get it right the first time. It’s vitally important to get it right the last time.
—DAVID THOMAS
The JavaScript variables described in the preceding chapter can’t do all that much by themselves. They don’t become useful members of your web code community until you give them something productive to do. For example, you can assign values to them, use them to assign values to other variables, use them in calculations, and so on.
This productive side of variables in particular, and JavaScript-based web code in general, is brought to you by a JavaScript feature known as the expression. When coding in JavaScript, you use expressions constantly, so it’s vital to understand what they are and to get comfortable with the types of expressions available ...
Get Web Coding & Development All-in-One For Dummies, 2nd 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.