Modular operation (remainder in division) : Operator « Language Basics « JavaScript DHTML






Modular operation (remainder in division)

  

<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
var a = 6, b = 4; 
alert(a % b);
</script>
</head>
<body>

</body>
</html>

   
    
  








Related examples in the same category

1.Using the Equal Operator
2.Examples of Increment and Decrement Operators
3.Operators and Expressions:Operator Summary Table
4.Working with the Increment Operator
5.Add two integer variables together
6.Subtract one integer variable from another integer variable
7.Multiply two integer variables together
8.Prefix plus
9.Prefix subtraction
10.Postfix adding
11.Postfix subtraction
12.Postfix operator for integer
13.Prefix operator for integer
14.JavaScript compound plus assignment
15.JavaScript compound subtraction assignment
16.JavaScript compound multiply assignment
17.JavaScript compound divide assignment
18.Ternary operator
19.Tenary operator