O'Reilly logo

JavaScript by Example, Second Edition by Ellie Quigley

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. Operators

image

5.1 About JavaScript Operators and Expressions

Data objects can be manipulated in a number of ways by the large number of operators provided by JavaScript. Operators are symbols, such as +, −, =, >, and <, that produce a result based on some rules. An operator manipulates data objects called operands; for example, 5 and 4 are operands in the expression 5 + 4. Operators and operands are found in expressions. An expression combines a group of values to make a new value, n = 5 + 4. And when you terminate an expression with a semicolon or a newline, you have a complete statement (e.g., n = 5 + 4;).

In the numeric expression ...

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