πŸ“Š Machine Learning
Q. What is the procedure to add methods to HTMLElement so that they will be inherited by the objects that represent the HTML tags in the current document?
  • (A) HTMLElement.prototype(…)
  • (B) HTMLElement.prototype
  • (C) HTML.addmethods()
  • (D) HTML.elements(add)
πŸ’¬ Discuss
βœ… Correct Answer: (B) HTMLElement.prototype

Explanation: It is implementation-dependent whether classes defined by the host environment (such as the web browser) can be augmented using Object.prototype. In many web browsers, for example, you can add methods to HTMLElement.prototype and those methods will be inherited by the objects that represent the HTML tags in the current document.

Explanation by: Mr. Dubey
It is implementation-dependent whether classes defined by the host environment (such as the web browser) can be augmented using Object.prototype. In many web browsers, for example, you can add methods to HTMLElement.prototype and those methods will be inherited by the objects that represent the HTML tags in the current document.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
181
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
99%
Success Rate