1, 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.
2, How do you open the Console in Google Chrome?
To open the JavaScript console in Chrome, you can navigate to the menu at the top-right of your browser window signified by three vertical dots in a row. From there, you can select More Tools then Developer Tools.
3; What does console.log function do?
It is used to print any kind of variables defined before in it or to just print any message that needs to
displayed to the user.
4, How can you change the contents of an HTML page through the console?
Edit HTML in the Console Panel
- Log a DOM node to the console
- Right click on it.
- Select Edit as HTML or Edit Text.
- Notice the DOM is updated on the page and also in the Elements Panel.