This chapter explains JavaScript operators in detail. It starts with the arithmetic operators and then looks at the comparison operators and logical operators that are used for formulating conditional checks in JS programs. The final section of the chapter covers the assignment and bitwise operators.
Arithmetic Operators
Arithmetic operators take values in the form of literals or variables as operands and return a single value. The standard arithmetic operators supported in JavaScript are listed in Table 3-1. Each is described in turn in the subsections that follow.