Page 95 - PortGPT_V2.1_C8_Flipbook
P. 95

</SCRIPT>

                 </BODY>                                                                             Factopedia
                 </HTML>
                 On running the above program, we get the following output:









                                                                                                  JavaScript is a
                                                                                               trademark of Oracle
                                                                                                Corporation in the
                                                                                                  United States.

















                                                                                                 JavaScript is the
                                                                                               dominant client-side
                                                                                               scripting language of
                                                                                               the Web, with 97% of
                                                                                               websites using it for
                           Let’s Back-uP
                                                                                                   this purpose.
                    •  The if statement is the simplest conditional statement.

                    •   In the if…else statement, if the condition evaluates to True,
                       the indented block following the if statement is executed,
                       otherwise the indented block  after the else statement  is
                       executed.
                    •  JavaScript allows the nested if statement.
                    •   The  switch  statement  executes  certain  statements
                       depending on user's choice.
                                                                                                JavaScript provides
                                                                                                  value and type
                                                                                               comparison operator
                                                                                                (===) to compair a
                                                                                              data type and a value.






                                                                                 Conditional Statements in JavaScript  93
   90   91   92   93   94   95   96   97   98   99   100