Console - Reading Assignment

  1. the console is used for interacting with javascript inside of the browser
  2. Click on the burger menu and select “developer tools”
  3. it logs the value inside of its argument to the console.
  4. document.body.innerHTML = "<h1>Some HTML in here</h1>"
1 Like
  1. What is the console used for?
    The console is used to allow the user to access the underlying code to a website and make alterations and test new ideas without making them permanent.

  2. How do you open the Console in Google Chrome?
    Go to the menu, select developer tools and then console.

  3. What does console.log function do?
    Allows you to execute functions on the console panel without it affecting the page itself.

  4. How can you change the contents of an HTML page through the console?
    You can only make temporary changes to the HTML document, however as soon as the page is refreshed it will will reset.

1 Like
1.	What is the console used for? 

The console provides the ability to write, manage, and monitor code on demand .

2.	How do you open the Console in Google Chrome?

Open the top right corner menu (three vertical dots); then select more tools; then select developer tools. A panel then opens where you can click on console. Alternatively the keyboard shortcut to the console is CTRL+SHIFT+J on Linux or Windows or COMMAND+OPTION+J on MacOS.

3.	What does console.log function do? 

It allows allows the coder to log JavaScript to the console additionally without having to constantly click out of pop up alerts

4.	How can you change the contents of an HTML page through the console? 

Simply type JavaScript code into the console. My understanding is that technically an existing HTML can’t be changed. A coder can experiment with modifications to the page but ultimately once the refresh button is clicked or the page is reloaded the page will revert to its pre-modified state. One can however save the changes to store elsewhere

1 Like
  1. The console provides an easy way to view a log of events and allows you to interact with the web page using javascript expressions.

  2. Via browser menu, keyboard shortcut or mouse shortcut.
    Browser menu: Vertical elipses > More tools > Developer tools > Console tab
    Keyboard shortcut: ctrl+shift+i > Console tab
    Mouse shortcut: right click > inspect > console tab

  3. Logs command outputs to the console rather than having them execute as part of the webpage.

  4. Change HTML through the console by using the appropriate Javascript document.* code and any other supporting javascript needed to make the changes function.
    The elements tab (inspector in firefox) seems easier though.
    Changes made in these ways are not permanent.

1 Like

Hi @abarbir,

Did you try defining the variable first ? using new Date(); ?

See below code for reference.

let d = new Date();
document.body.innerHTML = “Today’s date is " + d + “";

Hope this helps. :slight_smile:

  1. The console can be used to access the websites code and make impermanent changes.
  2. menu > dev tools > console
  3. It enables us to log JavaScript in the console, results are not showing on the web page
  4. Go to the elements section which is usually default on the page inspection command
1 Like

Thanks, I’ll go back and try that

1 Like
  1. The Console provides you with the ability to write, manage, and monitor JavaScript on demand through a web browser.

  2. To open the Console in Google Chrome click on the 3 vertical dots at the top right corner of your browser and then select more tools and then developer tools. Once the panel opens click on Console along the top menu bar which will open the Javascript Console. On my macOS I can also simultaneously press COMMAND + OPTION + J which will shortcut to the Console.

  3. Using console.log logs information to the Console.

  4. Load the HTML page into the browser of your choice, then open up the Console and begin working with JavaScript to modify the page.

2 Likes

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?

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. This will open a panel where you can click on Console along the top menu bar to bring up the JavaScript Console.

What does console.log function do?

The console. log() is a function in JavaScript which is used to print any kind of variables defined before in it or to just print any message that needs to be displayed to the user.

How can you change the contents of an HTML page through the console?

By right-clicking on the HTML in the “Elements” tab and selecting “Edit as HTML,” you can make live edits to the markup of a webpage that Chrome will immediately render once you are done editing.

1 Like
  1. The Console is used to log information with JavaScript.

  2. We can open the Console simply going to the right menu and Developer Tools.

3.Console.log is a function to print any kind of variables defined in it or any message that needs to be displayed.

4.Just switching from Console to Element or just right click and inspect.

1 Like
  1. To interact with javascript tru a browser

  2. 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. by logging it to the Console

  4. You can modify the contents of an HTML page by using the document element inside the console

1 Like

1. What is the console used for?
Console is a shell interface that provides you with the opportunity to write, manage, and monitor Javascript on demand.

2. How do you open the Console in Google Chrome?

  • Go to web page
  • Click on the three vertical dots on top right corner of browser
  • Select more tools
  • Select developer tools
  • Click console on top menu bar
    OR
    CTRL + shift + J (for windows)
    Command + option + J (for MacOS)

3. What does console.log function do?
Allows you to log data to the Javascript console.
Log examples:

  • you can add numbers
  • change colors of text and screen
  • can post date and time

4. How can you change the contents of an HTML page through the console?
Go to Element tab in Chrome and double click selected element and make changes.

1 Like

1.the Console provides you with the ability to write, manage, and monitor JavaScript on demand.
2. COMMAND + OPTION + J
3. It logs information to console
4. edit HTML contents double clicking the tag, element, or content to edit in the Elements tab and entering new data in.

1 Like

1 The Console make possible to write and monitor JavaScript lenguaje.

2 On the up right part of the bar, there is a menu located on three dots. When you make clic on in there is a menu. Select “developer tools” and on the next panel make clic on “console”.

3 We can work with JavaScript by logging in it to the console with console.log.

4 The console is a space to experiment modifying HTML pages, but its not leaving a permanent change on them.

1 Like
  1. The console allows uers to work in Javascript on the webpage they are visiting.
  2. CTRL + Shift J
  3. Console.log logs Javascript into the Console
  4. The user can change the script and elements in the HTML page by entering new vaiables into the console.
1 Like
  1. Allows the user to interact with the webpage
  2. Ctrl+shift+j
  3. Used to log information or solve functions
  4. Use the .innerHTML command
1 Like
  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?
    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?
    Within the Console, you can type JavaScript code.

  4. How can you change the contents of an HTML page through the console? By using document element.

1 Like
  1. What is the console used for?
    Inspect JS code, write and test your code manipulate DOM interact with elements of the webpage or execute functions
  2. How do you open the Console in Google Chrome?
    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. or control + shift + J pc command + option + J macOS
  3. What does console.log function do?
    log info to the console if you want to check any variable or result
  4. How can you change the contents of an HTML page through the console?
    by clicking the tag element or content you wish to edit using the document element inside the console by entering new data in
1 Like
  1. The Console is used to interact with a webpage using JavaScript expressions. You can live test code on an existing webpage and manipulate DOM using the console.

  2. Ctrl + Shift + j or F12

  3. prints the results into the console

  4. right click the element you want to change and click “inspect element”

1 Like

1.The console gives us the ability to write,monitor and manage Javascript on demand in a browser.

2.Click the three dots on the top right—>More Tools—>Developer Tools.

3.It logs a command directly into the browser without using the alert function.

4.Copy a html document then paste into the console.

1 Like