July 1998
Intermediate to advanced
1456 pages
65h 5m
English
% — NN 2 IE J1 ECMA 1
The modulus operator. This operator divides the number to the left of the operator by the number to the right. If a remainder exists after the division, the expression evaluates to that remainder as an integer. If there is no remainder, the returned value is zero. Both operands must be numbers. An expression with this operator evaluates to a number. Even if you aren’t interested in the remainder value, this operator is a quick way to find out if two values are evenly divisible.
if ((dayCount % 7) > 0) {
...
}Read now
Unlock full access