The following statements are about three important browser objects in…
2025
The following statements are about three important browser objects in JavaScript :
I. window object : The highest of all objects in the client-side JavaScript object hierarchy.
II. navigator object : A collection of information about the browser. Useful in browser sniffing.
III. document object : Provides access to the document being viewed
Which of the above statements is/are true ?
- A.
Only (I) above
- B.
Only (II) above
- C.
Only (III) above
- D.
All (I), (II) and (III) above
Attempted by 46 students.
Show answer & explanation
Correct answer: D
All three statements are correct. The window object is the top-level global object in client-side JavaScript, representing the browser window. The navigator object contains information about the user's browser and platform, commonly used for browser detection or sniffing. The document object provides access to the HTML content of the current page, allowing manipulation of elements and structure.