JavaScript compound plus assignment : Operator « Language Basics « JavaScript DHTML






JavaScript compound plus assignment

  


<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
var x = 6; 
alert(x += 2);
</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 subtraction
13.Postfix operator for integer
14.Prefix operator for integer
15.JavaScript compound subtraction assignment
16.JavaScript compound multiply assignment
17.JavaScript compound divide assignment
18.Ternary operator
19.Tenary operator