Console - Reading Assignment

Hi @Steve199!

Just a couple of observations to clarify some points…

Yes :+1:

No… it’s only displayed in the console, so this is for the developer’s benefit, not for the user (who will just see the actual web page in their browser).

Yes, we can change the contents of an HTML page there :+1: But this is a different developer tool.
In the actual console, we can do this by writing JavaScript code that accesses and manipulates the page’s Document Object Model (DOM).

2 Likes

Hi @Jason_Tibbetts!

I think you’re a little confused here… have a look at some of the other students’ answers. There are several different ways to open the Console in the browser, and I’m pretty sure this isn’t one of them :wink:
I tried following your instructions, just to check, and I got lost :joy:

By the way, have you already done the other 3 questions and posted your answers already? I can’t see them…

1 Like

I will go back and look at it again to make sure my concussion is right and no I haven’t answered the other questions yet.

1 Like

Hi,
thanks for the answer!

yeah i meant this, and the user i mean the developer, not the user the see the web page in the browser, wasn’t explained properly, sorry. :slight_smile:

ok, thanks for the clarification i needed and i will try to understand properly.

1 Like
  1. What is the console used for?
    To inspect elements and test javascript on the console log and see how it will be processed on the webpage.
  2. How do you open the Console in Google Chrome?
    Control+SHIFT+J or F12 or three dots top right hand site and look for developer tools
  3. What does console.log function do?
    logs info to the console and displays a return value
  4. How can you change the contents of an HTML page through the console?
    click on the inspector tab to inspect the HTML elements of the page and double click to change them
1 Like

CMND + OPTION + J worked for me on my Mac.

1 Like
  1. What is the console used for?
    To log information or to carry out expressions of code. Its a place where you can try out ideas.

  2. How do you open the Console in Google Chrome?
    By navigating to Menu/More Tools/Developer Tools or also open it with keyboard shortcut CTRL + SHIFT + J or just F12 works often too.

  3. What does console.log function do?
    Outputting the expression of the code.

  4. How can you change the contents of an HTML page through the console?
    By entering JavaScript within the context of the existing HTML code in the DOM. The HTML document itself though gets never changed and will be reinstated to its original version when reloading the page in the browser.

1 Like
  1. A shell interface used to inspect the DOM, and also debug and analyze network activity.

  2. Command; Option; J

  3. Gives us the ability to manage, write, and monitor JS on demand.

  4. By going to the document elements on console and double-clicking the area to be edited.

1 Like
What is the console used for?
a tool to interact with the webpage and do javascript

How do you open the Console in Google Chrome?
Click more tools then developer tools.

What does console.log function do?
lets you work with javascript with having alerts

How can you change the contents of an HTML page through the console?
have an HTML file saved and open the developers site.
you can you document.body....
1 Like

Q1: The console gives us the ability to write, monitor, and manage JS on demand.

Q2: There are two ways you can access the console the first by going to developer tools and looking for the console there or thru a shortcut (CTRL + SHIFT + J)/ or (CMND + OPTN + J) depending on the OS your running.

Q3: It logs certain info to the console to prevent repeatable annoying tasks like pop up alerts

Q4: Accessing the web page’s DOM.

1 Like

Hi @cincinnato,

Q1, 2 & 4 :ok_hand:

I’m not really sure what you mean here…You still need to run the code/program which has console.log() in it in order for it to “show the result”, as you say i.e. display the value within its parentheses in the console.

1 Like

Hi @Batist_Van_Houtte,

Good answers :ok_hand:

Just to clarify question 4…

2 Likes

Hi @LXSO ,

Good answers :ok_hand:

Just to clarify question 4, have a look at this post.

1 Like

I will keep that in mind. Thanks.

1 Like

Hi, thanks for help i’ll keep that in mind.

1 Like
  1. The console is for interacting with the page through Javascript, it can be used to print out information or to send commands.
  2. Dev tools
  3. console.log writes a message to the console.
  4. The contents of a page can be changed by modifiying the variable document.body.innerHTML
1 Like
  1. What is the console used for?

Console is an application interface which allows the user to write, manage and monitor Javascript in real time within a web browser.

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

To access console in google chrome - Go to the menu --> More tools --> Developer Tools --> Console tab (CTRL+SHIFT+J)

  1. What does console.log function do?

This function is used to output commands into the console.

  1. How can you change the contents of an HTML page through the console?
    You can use Javascript commands through DOM
1 Like
  1. The console can be used to interact with the elements of the webpage or to execute functions

  2. Control+Shift+J

  3. It logs information to the javascript console

  4. by using the document element inside the console.

1 Like
  1. The console is used for managing, writing, and monitoring JavaScript code in a browser.

  2. In Chrome you either, use the shortcut (ctrl+shift+j), or you go into settings>more tools>developer tools>console.

  3. It allows the developer to make different changes to the website without any windows popping up. The output will be contained inside the console.

  4. You can do that by using JavaScript commands in DOM to edit the HTML page.

1 Like
  1. What is the console used for?
    Console allows you to edit a webpage live

  2. How do you open the Console in Google Chrome?
    For MAC = command + option + J or ‘three dots’ > more tools > developer tools

  3. What does console.log function do?
    console.log allows us to log our commands into the console so we don’t just have pop-up alerts

  4. How can you change the contents of an HTML page through the console?
    Click over to ‘elements’ and then double click the code that you would like to edit

1 Like