Window is a global object of JavaScript while document is a property of the window object.
Window includes the following and more:
🔵 Global functions
🔵 Location
🔵 History
🔵 Web Components
🔵 setTimeout
🔵 XML-Http Request
🔵 Console
🔵 LocalStorage
Document includes the following:
🔵 DOM (Document Object Model) of the page
🔵 Methods that traverse the DOM
Top comments (0)