Using the Equal Operator : Operator « Language Basics « JavaScript DHTML






Using the Equal Operator

  
<html>
<head>
  <title>Using the Equal Operator</title>
</head>
<body>  <script type="text/javascript">
  <!--
    var x = 5;
    var y = 5;
    var z = 10;

    document.write("x = " + x + "<br>");
    document.write("y = " + y + "<br>");
    document.write("z = " + z + "<br>");
    document.write("Is x equal to y,(x == y)? ");
    document.write(x == y);
    document.write("<br>Is y equal to z,(y == z)? ");
    document.writeln(y == z);
  // -->
  </script>
   
</body>
</html>



           
         
    
  








Related examples in the same category

1.Examples of Increment and Decrement Operators
2.Operators and Expressions:Operator Summary Table
3.Working with the Increment Operator
4.Add two integer variables together
5.Subtract one integer variable from another integer variable
6.Multiply two integer variables together
7.Modular operation (remainder in division)
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