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

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



           टा  5:   च  ेटम ट का उपयोग करना

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

           2  िन िल खत कोड िलख

              <html >
              <head>

              <title> switch statement </title>

              </head>
              <body>

              <script>

              const day = “Wednesday”;
              switch (day)

              {

              case “Monday”: console.log(“Start of the week!”);

              break;
              case “Friday”:   console.log(“TGIF!”);

              break;

              case “Weekend”: console.log(“Time to relax!”);
              break;

              default:   console.log(“Another day in the week.”);

              }

              </script>
              </body>

              </html>

           3   ो ाम को .html फ़ाइल के   प म  सेव कर
           4  वेब  ाउज़र से html फ़ाइल ओपन कर

           5   ाउज़र कं सोल टैब पर जाएँ  और आउटपुट की पुि  कर ।




















                                                           136

                                      CITS : IT & ITES - कं  ूटर सॉ वेयर ए ीके शन - अ ास 39
   147   148   149   150   151   152   153   154   155   156   157