Q. Which is the most appropriate database for developers requiring huge amount of data?

  • (A) Database
  • (B) Datawarehouse
  • (C) Web databases
  • (D) Access
πŸ’¬ Discuss
βœ… Correct Answer: (C) Web databases
Explanation: Developers who need to work with really huge amounts of data like to use databases, and the most recent browsers have started to integrate client-side database functionality into their browsers.

Q. The localStorage and sessionStorage belongs to

  • (A) Window object
  • (B) Element object
  • (C) Hash object
  • (D) DOM object
πŸ’¬ Discuss
βœ… Correct Answer: (A) Window object
Explanation: Browsers that implement the “Web Storage” draft specification define two properties on the Window object: localStorage and sessionStorage. Both properties refer to a Storage object—a persistent associative array that maps string keys to string values.

Q. What is the main difference between localStorage and sessionStorage?

  • (A) Lifetime
  • (B) Scope
  • (C) Both Lifetime and Scope
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (C) Both Lifetime and Scope
Explanation: The difference between localStorage and sessionStorage has to do with lifetime and scope: how long the data is saved for and who the data is accessible to.

Q. What is the lifetime of the data stored through localStorage?

  • (A) Permanant
  • (B) Temporary
  • (C) Both Permanant and Temporary at times
  • (D) Cannot store
πŸ’¬ Discuss
βœ… Correct Answer: (A) Permanant
Explanation: Data stored through localStorage is permanent: it does not expire and remains stored on the user’s computer until a web app deletes it or the user asks the browser (through some browser-specific UI) to delete it.

Q. Which is the function used to retrieve a value?

  • (A) get()
  • (B) retrieve()
  • (C) getItem()
  • (D) retrieveItem()
πŸ’¬ Discuss
βœ… Correct Answer: (C) getItem()
Explanation: To retrieve a value, pass the name to getItem().

Q. Which is the function used to store a value?

  • (A) setItem()
  • (B) set()
  • (C) storeItem()
  • (D) store()
πŸ’¬ Discuss
βœ… Correct Answer: (A) setItem()
Explanation: To store a value, pass the name and value to setItem().

Q. Which of the following are the features of jQuery?

  • (A) Efficient query method for finding the set of document elements
  • (B) Expressive syntax for referring to elements in the document
  • (C) Useful set of methods for manipulating selected elements
  • (D) All of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the mentioned
Explanation: These features are at the heart of jQuery’s power and utility:

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

  • (A) jQuery()
  • (B) $()
  • (C) Queryanalysis()
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (A) jQuery()
Explanation: The jQuery library defines a single global function named jQuery(). This function is so frequently used that the library also defines the global symbol $ as a shortcut for it.

Q. Which of the following is a factory function?

  • (A) $()
  • (B) jQuery()
  • (C) Queryanalysis()
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (B) jQuery()
Explanation: jQuery() is a factory function rather than a constructor: it returns a newly created object but is not used with the new keyword) jQuery objects define many methods for operating on the sets of elements they represent, and most of this chapter is devoted to explaining those methods.

Q. Which is the code that asks for the set of all div elements in a document?

  • (A) var divs = $(div);
  • (B) var divs = jQuery("div");
  • (C) var divs = $("div");
  • (D) var divs = #("div");
πŸ’¬ Discuss
βœ… Correct Answer: (C) var divs = $("div");
Explanation: The code to ask for the set of all div elements in a document is