Page 268 - Web_Application_v2.0_C12_Fb
P. 268

6.  ............................... is a special variable, with the capacity to hold several values.
                    i.  Function                                      ii.  Constant
                    iii.  Loop                                       iv.  Array
                  7.  Which of the following is an event in JavaScript?
                    i.  onmouseout                                    ii.  setTimeout
                    iii.  parseInt                                   iv.  toUpperCase
                  8.  A function defined inside another function is called ............................... function.
                    i.  joined                                        ii.  nested
                    iii.  double                                     iv.  embed


                  9.  Which of the following statements is not true for JavaScript?                    [CBSE Handbook]
                    i.   JavaScript is a compiled language.
                    ii.   In JavaScript an interpreter in the browser reads over the JavaScript code.
                    iii.  Any error found in the code, will stop the further execution of the program.
                    iv.  JavaScript can be implemented using <script>… </script> tags.
                 10.  A script cannot be placed ................................                       [CBSE Handbook]
                    i.   In the body of the page                      ii.  In the header of the page
                    iii.  In a file with extension .js               iv.  In a file with extension .css


                     Ans.  1.  iii   2. iv     3. i     4. iii   5. ii    6. iv    7. i     8. ii    9. i     10. iv


              B.  Fill in the blanks.
                  1.  NaN stands for ................................

                  2.  ............................... represent entities from the outside world that we want to express in our programs through
                    properties, and methods.
                  3.  If you want the user to enter a value before seeing a page, a ............................... box is frequently utilised.

                  4.  When a variable is declared but not given a value, its type is ............................... by default.
                  5.  JavaScript uses ............................... to handle HTML events.

                  6.  The ............................... function returns the location of a value’s first appearance in a string.
                  7.  A return statement in JavaScript causes the function to ................................

                  8.  The ............................... method removes white space from both ends of a string.
                  9.  A function to convert to a floating-point number is ................................      [CBSE Handbook]

                 10.  A function to check if something is Not a Number is ................................   [CBSE Handbook]


                  Ans.  1. Not a Number         2. Objects           3. prompt       4. undefined       5. event handlers

                       6. indexOf()             7. terminate         8. trim()       9. parseFloat()   10.  isNaN()


              C.  State whether the following statements are true or false.
                  1.  When JavaScript is used as an event handler, it interacts with HTML elements.          .....................

                  2.  The push() method adds elements to the beginning of an array.                          .....................


                266   Touchpad Web Applications (Ver. 2.0)-XII
   263   264   265   266   267   268   269   270   271   272   273