|Top Previous Next|
Operators: + - * / %
Otherwise, both expressions are converted to Number. If either expression is NaN, the result is NaN. The division operator / always converts both expressions to internal floating-point format. All other operators use integer format if both expressions are integer, or floating-point format if not.
The modulo operator % computes the remainder of division. Mathematically, x % y computes n = x / y and truncates n to an integer. Then the result of the operator is x - (y * n).