Java Reference
In-Depth Information
Comparison Operators (continued)
Name
Introduced
Meaning
Less than or
equal to
JavaScript 1.0
v1 <= v2
True if LHS operand is less than or equal to RHS operand.
Strictly equal
JavaScript 1.3
v1 === v2
True if operands are equal and of the same type.
Not strictly
equal
JavaScript 1.3
v1 !== v2
True if operands are not strictly equal.
Arithmetic Operators
Arithmetic operators allow you to perform arithmetic operations between variables or values.
Name
Introduced
Meaning
Addition
JavaScript 1.0
v1 + v2
Sum of v1 and v2.
(Concatenation of v1 and v2, if either operand is a string.)
Subtraction
JavaScript 1.0
v1 - v2
Difference between v1 and v2.
Multiplication
JavaScript 1.0
v1 * v2
Product of v1 and v2 .
Division
JavaScript 1.0
v1 / v2
Quotient of v2 into v1.
v1 % v2
Modulus
JavaScript 1.0
Integer remainder of dividing v1 by v2.
Prefi x increment
JavaScript 1.0
++v1 * v2
(v1 + 1) * v2 .
Note: v1 will be left as v1 + 1.
Postfi x increment
JavaScript 1.0
v1++ * v2
(v1 * v2); v1 is then incremented by 1.
Search WWH ::




Custom Search