///this is my seconday task , my file was deleted that why attached here/// differnce between document and window object? document objects *it represents a web page that is loaded in the browser we can acesses the element in the page with the help of documents objects * document object is inside in the qwindoe objects Syntex document.property_name; window objects it is the topmost object of the DOM like a tree structure. It represents a browser window or frame that displays the contents of the webpage. Whenever a window appears on the screen to display the contents of the document, the window object is created. Syntax: window.property_name; differnce document and window object * documents It represents any HTML document or web page that is loaded in the browser. It is loaded inside the window. It is the object of window property All the tags, elements with attributes in HTML are part of the document. We can access the document from a window using the window. document The document is part of bom (browser object model) and dom (Document object model) Properties of document objects such as title, body, cookies, etc can also be accessed by a window like this window syntax: document.boby; output It will return the body of the content * window It represents a browser window or frame that displays the contents of the webpage. It is the very first object that is loaded in the browser. It is the object of the browser Global objects, functions, and variables of JavaScript are members of the window object. We can access the window from the window only. i.e. window.window The window is part of BOM, not DOM. Properties of the window object cannot be accessed by the document object. syntax: window.confrim; It is used to display a modal dialog with an optional message and two buttons i.e. OK and Cancel. It returns true if the user clicks “OK”, and false otherwise. this all under in the html file like the property_name mention