Question: what is the difference between window and document object?
Answer: Well, the window is the first thing that gets loaded into the browser. ... The document object is your html, aspx, php, or other document that will be loaded into the browser. The document actually gets loaded inside the window object and has properties available to it like title, URL, cookie, etc.