Use and Understand the DOM to Test and Modify JavaScript


show more Testing JavaScript commands with the console provides you with in-depth training on Developer. Taught by Ray Villalobos as part of the JavaScript: Enhancing the DOM show less
please wait ...

Testing JavaScript commands with the console

In the last movie, we learned how to work with the developer tools. And how to activate the console. In this movie, we're going to focus just on the console. So the quickest way to get to the console is by hitting Command+Option+J. And I'm using a Mac right now. On a PC, Command is usually Ctrl, Option is usually Alt. So this would be Ctrl+Alt+J. It might be more convenient, though, to call the console within the elements panel. So, you can do that by clicking on the Elements panel and then hitting the Esc key. That toggles the console on and off. The DOM can be accessed by using selectors.

So if I just type in document, it selects the entire DOM and I can click on it, just like I can with the Elements tab. The DOM has added completion, so as soon as I start typing doc, it's suggesting that I probably want the document, so I can hit Tab and then Return to execute that command. If you type in a period after document, then it's going to select from this list ...

Testing JavaScript commands with the console
Video duration: 5m 50s 2h 3m Intermediate

Viewers:

Testing JavaScript commands with the console provides you with in-depth training on Developer. Taught by Ray Villalobos as part of the JavaScript: Enhancing the DOM

Subjects:
Developer Web
Software:
HTML JavaScript
Author:
please wait ...