Page 139 - CITS - CSA - TP (Volume 1) - Hindi
P. 139

कंप्यूटर सॉफ्टवेयर एप्लीकेशन- CITS





                 console.log(“Updated value of y:”, y); // Output: 8
                 // Constants

                 const PI = 3.14;
                 // PI = 3.14159; // Trying to reassign a constant will result in an error
                 console.log(“Value of PI:”, PI); // Output: 3.14
                 </script>

                 </body>
                 </html>

              3   ो ाम को .html फ़ाइल के   प म  सेव कर
              4  वेब  ाउज़र से html फ़ाइल ओपन कर
              5   ाउज़र कं सोल टैब पर जाएँ  और आउटपुट की पुि  कर ।




















           II  िविभ   कार के  वे रएबल का उपयोग करना

              1  टे  एिडटर ओपन कर

              2  िन िल खत कोड िलख
                 <html >

                 <head>
                 <title> Different types variable </title>
                 </head>

                 <body>
                 <script>
                 // Numbers:

                 let num = 123.45;
                 // Strings:

                 let text = “This is a string.”;
                 // Boolean (true/false):
                 let isTrue = true;
                 // Arrays (lists of values):





                                                           123

                                     CITS : IT & ITES - कं  ूटर सॉ वेयर ए ीके शन - अ ास 38
   134   135   136   137   138   139   140   141   142   143   144