Commerce

Classes And Modules MCQs

Practice Classes And Modules MCQs for competitive exams.

Classes And Modules MCQs

Practice questions from this topic.

What is the code required to delete all “weight” tags?

  1. A. delete weight(pt).all
  2. B. delete pt.element[all]
  3. C. delete pt
  4. D. delete pt..weight
Report Error

Which of the following is an example to perform the most common XML manipulations using the XML objects invocation?

  1. A. insertChildBefore()
  2. B. insertChildAfter()
  3. C. appendChildAfter(…)
  4. D. appendChildBefore(…)
Report Error

Which of the following is the descendant operator?

  1. A. ..
  2. B.
  3. C. *
  4. D. @
Report Error

Which method to use while working with XML fragments, instead of XML()?

  1. A. XMLInterface()
  2. B. XMLClass()
  3. C. XMLList()
  4. D. XMLArray()
Report Error

What is the return type of typeof for standard JavaScript objects?

  1. A. xml
  2. B. object
  3. C. dom
  4. D. html
Report Error

When will the finally block be called?

  1. A. When there is no exception
  2. B. When the catch doesnot match
  3. C. When there is exception
  4. D. None of the mentioned
Report Error

What will be the reaction when a catch clause has no conditionals ?

  1. A. Takes it to be 0
  2. B. Takes it to be 1
  3. C. Takes it to be true
  4. D. Takes it to be false
Report Error

What is the code to be used to trim whitespaces ?

  1. A. let trimmed = (l.trim() for (l in lines))
  2. B. let trimmed = (trim(l))
  3. C. let trimmed = l.trim()
  4. D. let trimmed = for(l in lines))
Report Error

Consider the following code snippet data . sort (function( a,b ) ,b - a ) ; What does the above code do?

  1. A. Sort in the alphabetical order
  2. B. Sort in the chronological order
  3. C. Sort in reverse alphabetical order
  4. D. Sort in reverse numerical order
Report Error

Consider the following code snippet let succ = function ( x ) x + 1 , yes = function () true , no = function () false ; What convenience does the above code snippet provide?

  1. A. Functional behaviour
  2. B. Modular behaviour
  3. C. No convenience
  4. D. Shorthand expression
Report Error

Which method of the iterable object returns an iterator object for the collection?

  1. A. iterator()
  2. B. _iterator_()
  3. C. _iteration_()
  4. D. _return_iterator_()
Report Error

Which exception does the Iterators throw from their next() method when there are no more values to iterate, that work on finite collections ?

  1. A. ExitIteration
  2. B. AbortIteration
  3. C. Abort
  4. D. StopIteration
Report Error