Multiplicative Operator Group
Multiplication ( * )
Division ( / )
Modulus ( % )



Navigation Aids -- This Page        Navigation Aids -- This Topic        Navigation Aids -- This Site




Review of Terms Related to This Topic





The Purpose for this Page

This page will show the basic rules for JavaScript multiplicative operator group. In addition, type conversions are discussed where applicable. Some special situation cases are explained. And finally, some scripting examples are provided with comments.





The Basics of Multiplicative Operators





Special Situations





Some Script Examples


Expression Result Comment
5 * 1.1 5.5 floating point example
5 * 0 0 either operand is zero, the result is zero
-5 * -2 10 two negative operands make a positive result
5 * -2 -10 opposite signed operands make a negative result
10 / 4 2.5 floating point example
10 / 0 infinity The result is infinity when dividing a non-zero finite by zero.
0 / 0 NaN The result is NaN when both operands are zero.
2007 % 4 3 the remainder is 3 after dividing 2007 by 4
6.3 % 3.1 .1 floating point example
-6.3 % 3.1 -0.1 The sign of the result is the same as the sign of the dividend.


Top            

Rx4AJAX        About Us | Topic Index | Contact Us | Privacy Policy | 2008 This Site Built By PPThompson