window object
JavaScript topics covered:

The Dom (Document Object Model)

With JavaScript, you can access almost everything on the HTML document. The DOM (Document Object Model) is our road map showing us how JavaScript can access individual HTML elements by turning each tag into its own programmatic object. Objects have properties that describe them.

Basically what the DOM says is we have a browser window, and within the browser window we have our HTML document. On the HTLM document we have our HTML elements, like images, forms, links etc. First let's look at the browser window as a window object. The window has properties and methods. Some of the properties of the window browser are also objects, like history, location, navigator, screen, and document objects. Other properties are status, closed, opener, parent.

The window also have several methods, we have already seen the dialog boxes of the alert(), confirm() and prompt(). In all the examples we have seen, like the alert() have been coded like alert("I am here") when actually it could have been coded window.alert("I am here"). The window is a global object, which means the browser window and HTML documents can see it. So, we don't have to refer to it by it's name, so you could say window is the default.