Page 139 - Computer Software Application TP - Volume 1
P. 139

COMPUTER SOFTWARE APPLICATION - CITS




                 </head>
                 <body>
                 <script>

                 let a = 10;
                 let b = 5;
                 // Equal to
                 console.log(“Equal to:”, a == b); // Output: false

                 // Not equal to
                 console.log(“Not equal to:”, a != b); // Output: true
                 // Greater than
                 console.log(“Greater than:”, a > b); // Output: true
                 // Less than

                 console.log(“Less than:”, a < b); // Output: false
                 // Greater than or equal to
                 console.log(“Greater than or equal to:”, a >= b); // Output: true
                 // Less than or equal to
                 console.log(“Less than or equal to:”, a <= b); // Output: false

                 </script>
                 </body>
                 </html>
              3  Save the program as a .html file
              4  Open the html file with a web browser

              5  Go to the browsers console tab and verify the output.





















           III  Logical operators

              1  Open the text editor
              2  Write the following codes
                 <html >
                 <head>

                 <title> Logical operators </title>



                                                           124
                               CITS : IT & ITES - Computer Software Application - Exercise 38
   134   135   136   137   138   139   140   141   142   143   144