Divides the value of one expression by the value of another, and returns the remainder.
The modulus, or remainder, operator divides number1 by number2and returns only the remainder as result. The sign of result is the same as the sign of number1. The value of result is between 0 and the absolute value of number2.
The following code shows how to use the modulus operator.
var modResult = 19 % 6.7; document.write(modResult); // Output: 5.6
Supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, Internet Explorer 10 standards. Also supported in Windows Store apps. See Version Information.