Question: Generally speaking, when used on a web page, how should jQuery be installed, and why?

  1. Just before the closing body tag, because we want to avoid blocking other resources from loading, and we use the ready method to make sure our code fires after the DOM is ready
  2. Using the highest version number possible because only jQuery 3 and up are compatible with Internet Explorer 7
  3. In the head tag because we want jQuery available as soon as possible
  4. From a CDN because we want to be able to use jQuery online or offline

Answer: The correct answer of the above question is Option A:Just before the closing body tag, because we want to avoid blocking other resources from loading, and we use the ready method to make sure our code fires after the DOM is ready