%= (Modulus Assignment) : Mod : Operators JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Operators » Mod »

 

%= (Modulus Assignment)







The modulus assignment operator divides the value stored in the left variable by the right value.
If value is a string, an attempt is made to convert the string to a number before performing the modulus and assignment.












<html>
     <script language="JavaScript">
    <!--
    answer = 3;
    answer %= 17;
    document.write("answer = ",answer);
    -->
    </script>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Operators
» Mod