Let's interact with the DOM

The DOM API, which is provided by the browser to lets JavaScript interact with the web page, give JavaScript much of its power: by calling methods provided by the DOM API, JavaScript code can change anything about a webpage.

By interacting with the DOM we can also open new windows the DOM API, we can change a webpage.

You can write any program in JavaScript and let it execute in the browser, for example a computer game:

Interactive JavaScript programming using the web console

The web console of the browser provides a command line to try out JavaScript programs and explore the DOM. In Firefox, you can open the console with CTRL-SHIFT-K or under Tools -> Web Developer -> Web Console. In the console you can enter JavaScript code that is then executed (aka evaluated) by the JavaScript engine in the browser.

FOR YOU TO DO: open the web console and type in the commands below