本文档基于 CC协议(Creative Commons Share-Alike License)发布,是developer.mozilla.com, www.mozref.comwww.aptana.com共同劳动的成果。

%

Divides a number by another number and returns the remainder.

Syntax

numberA % numberB

Example

myModulus = 11 % 2;
//myModulus = 1; 

Remarks

Use % to determine if the value of a variable is even or odd.