Postfix subtraction : Operator « Language Basics « JavaScript DHTML






Postfix subtraction

  

<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
var a = 6, b = 2; 
alert(a-- + b);
alert(a);
</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.Modular operation (remainder in division)
9.Prefix plus
10.Prefix subtraction
11.Postfix adding
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