Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 124 - 2625 PortGPt V2.1
P. 124

    Test Sheet  2                                                            (Based on chapters 5 to 8)

                      A.  Write ‘T’ for True and ‘F’ for False.
                          1.   The if…else statement is the simplest conditional statement.                            ___

                          2.   JavaScript does not allow nested if statement.                                          ___
                          3.   In for loop, i<=10 is known as conditional expression.                                  ___

                          4.   The continue statement breaks one loop at a time.                                       ___

                          5.   If i = 1, then the loop while(i < 5) {i++;} will execute 4 times.                       ___
                          6.   We attach an event listener to the HTML element.                                        ___

                          7.   The Switch statement allows you to test multiple conditions.                            ___
                          8.   In submit event, the user clicks on a button.                                           ___

                      B.  Fill in the blanks.

                          1.     JavaScript  was  developed  by  ____________________, a  Netscape  Communications
                               Corporation programmer, in 1995.

                          2.     JavaScript is a ____________________ typed language which means it does not require a
                               data type to be declared before using it.

                          3.     The ____________________ statement executes a set of statements repeatedly, until the
                               logical expression remains true.

                          4.   The do-while loop will execute ____________________ even if the text condition is false.
                          5.     The  ____________________ and  ____________________ are  the jump  statements  in
                               JavaScript.

                          6.     The simplest and most widely used is the ____________________ event which occurs on

                               the click of a button.
                          7.   An event is defined as a change in an object’s ___________________.

                          8.   An ___________________ is used to display messages.

                      C.   Short answer type questions.

                          1.     What are the instructions given to JavaScript interpreter to take some actions called?
                          2.    What was the first name of the JavaScript?
                          3.   What is decision making statement?

                          4.   Write the syntax for the Switch statement.

                     122    Premium Edition-VIII

| 119 120 121 122 123 124 125 126 127 128 129 |