Prefix operator for integer : Operator « Language Basics « JavaScript DHTML






Prefix operator for integer

 

<html>
<head>
<title></title>
</head>
<body>
<script type="text/javascript">

var theNum = 1;
document.write(theNum+"<BR>");
document.write(++theNum+"<BR>");
document.write(theNum+"<BR>");

</script>
</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.Modular operation (remainder in division)
9.Prefix plus
10.Prefix subtraction
11.Postfix adding
12.Postfix subtraction
13.Postfix 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