- What is the console used for?
“The Console can be used to log information as part of the JavaScript development process, as well as allow you to interact with a web page by carrying out JavaScript expressions within the page’s context. Essentially, the Console provides you with the ability to write, manage, and monitor JavaScript on demand.”
- How do you open the Console in Google Chrome?
CTRL + SHIFT + J on Linux or Windows, or COMMAND + OPTION + J on macOS
or
F12 an then click on Console along the top menu bar to bring up the JavaScript Console if it is not highlighted already
- What does console.log function do?
“With console.log we can work with JavaScript by logging it to the Console, rather than have pop-up alerts that we need to continue to click out of.”
- How can you change the contents of an HTML page through the console?
Typing JavaScript code in the console and also change the code in the Inspector panel in Firefox or the Elements panel in Chrome.