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)