Simplified guide of MCQs for Exams, Interviews

Sub Topic: Jquery

1 .  Which of the following type of variable is visible everywhere in your JavaScript code?

  • A. global variable
  • B. local variable
  • C. None

Correct Answer:

global variable


2 .  Which built-in method removes the last element from an array and returns that element?

  • A. last()
  • B. get()
  • C. pop()
  • D. None

Correct Answer:

pop()


3 .  Which built-in method returns the calling string value converted to upper case?

  • A. toUpperCase()
  • B. toUpper()
  • C. changeCase(case)
  • D. None

Correct Answer:

toUpperCase()


4 .  Which of the following jQuery method sets the html contents of an element?

  • A. html( val )
  • B. setHtml( val )
  • C. setInnerHtml( val )

Correct Answer:

html( val )


5 .  Which of the following jQuery method finds all sibling elements after the current element?

  • A. locateNextAll( selector )
  • B. getNextAll( selector)
  • C. nextAll( selector )
  • D. None

Correct Answer:

nextAll( selector )


6 .  Which of the following jQuery method sets the height property of an element?

  • A. setCSSHeight( value )
  • B. setHeight( value)
  • C. height( value )
  • D. None

Correct Answer:

height( value )


7 .  Which of the following jQuery method returns the outer width (including the border) of an element?

  • A. getCSSWidth( )
  • B. getWidth( )
  • C. outerWidth( [margin] )
  • D. None

Correct Answer:

outerWidth( [margin] )


8 .  Which of the following is correct?

  • A. jQuery is a JSON Library
  • B. jQuery is a JavaScript Library

Correct Answer:

jQuery is a JavaScript Library


9 .  Which of the following is a single global function defined in the jQuery library?

  • A. jQuery
  • B. $
  • C. Queryanalysis
  • D. None

Correct Answer:

jQuery


10 .  Which of the following jQuery method can be used to attach a function to be executed whenever AJAX request completed successfully?

  • A. ajaxStart( callback )
  • B. ajaxSuccess( callback )
  • C. ajaxSend( callback )
  • D. ajaxStop(callback)

Correct Answer:

ajaxSuccess( callback )