What is the console used for?
The Console is similar to a shell interface that allows you to write, manage, and monitor JavaScript on demand. The JavaScript Console provides you with a space to try out JavaScript code in real time by letting you use an environment similar to a terminal shell interface.
How do you open the Console in Google Chrome?
If you navigate to the menu at the top-right of your browser window signified by three vertical dots in a row, you can select More Tools, and then select Developer Tools. You can also enter into the JavaScript Console by using the keyboard shortcut CTRL + SHIFT + J on Linux or Windows, or COMMAND + OPTION + J on macOS, which will open up the Console window to the right.
What does console.log function do?
It allows us to keep a log of our javascript entries so that we can track our progress.
How can you change the contents of an HTML page through the console?
You can then open up the Console and begin working with JavaScript to modify an HTML page. The Console provides you with a space to experiment with modifying HTML pages. However you are not permanently changing the HTML document when you execute console commands, so once you reload the page it will return to a blank document.