Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
This section covers the operators that perform arithmetic or other numerical manipulations on their operands.
*)Computes the product of its two operands.
/)The / operator divides its
first operand by its second. If you are used to programming
languages that distinguish between integer and floating-point
numbers, you might expect to get an integer result when you divide
one integer by another. In JavaScript, however, all numbers are
floating-point, so all division operations have
floating-point results: 5/2 evaluates to 2.5, not 2. Division by zero yields positive or
negative infinity, and 0/0
evaluates to NaN: neither of
these cases raises an error.