Console - Reading Assignment

  • What is the console used for?

Console is log the page data. I can interact with the web pages by carrying out Javascript expressions.It is similar to shell interface.

  • How do you open the Console in Google Chrome?

Three point on the top rigt, additional tools, developer tools and click to the Console

  • What does console.log function do?

Console has a program, called console.log. It displays things to the monitor.

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

Log belongs ot console so I have to call console then DOT then log()

1 Like

1. What is the console used for?
To live edit and test “code” for a website and execute JavaScript

2. How do you open the Console in Google Chrome?
Crtl+Shift+J

3. What does console.log function do?
Prints commands/text for the console that does not show up on the website part.

4. How can you change the contents of an HTML page through the console?
By going to the “elements” part of it.

1 Like
  1. It provides the ability to write manage and monitor java-script on demand.
  2. From the menu list select more tools then finally Developer Tools.
    3.Prints texts to the console
    4.By using the document.() function you can manipulate the contents on a HTML page.
1 Like
  1. What is the console used for?
  • The Console allows you to interact, with any webpage, using javascript.
  1. 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.
  1. What does console.log do?
  • Gives back outputs within the console.
  1. How can you change the contents of an HTML page through the console?
  • document.body.style.color, document.body.style.backgroundColor and so on.
1 Like

What is the console used for?

  1. To test code , inspect element , execute JavaScript commands as well as log information.

How do you open the Console in Google Chrome?

  1. F12 , Ctrl+Shift+J

What does console.log function do?

  1. logs results into the JS console

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

  1. Right click & select “inspect” with chrome
1 Like
  1. What is the console used for?
    It allows you to make adjustments to the JavaScript code on a page in real time and see the results. These changes aren’t saved, they go away if you refresh the browser page. You can use the console to keep a log of your development work.

  2. How do you open the Console in Google Chrome?
    Click the 3-dot menu button, then ‘more’, then ‘develop’er tools’.

  3. What does console.log function do?
    It allows you to write code and see the results within the console, instead of getting pop-ups in your browser pane that need to be clicked out of. Using the up arrow will allow you to access previous versions of code you’ve been working with.

  4. How can you change the contents of an HTML page through the console?
    You can open an HTML page with your browser, then open the console, then start tweaking the code to see real time changes in your browser window. You need to save the code before refreshing the browser.

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?

    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 if it is not highlighted already. 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 bring focus immediately to the Console.

  3. What does console.log function do?

    It outputs information to the JavaScript Console

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

    The DOM is a tree of Objects and shows the HTML elements within a hierarchical view. The DOM Tree is available to view within the Inspector panel in Firefox or the Elements panel in Chrome.

1 Like
  1. What is the console used for?
    It allows you to code in javascript to interact with a webpage that is opened.

  2. How do you open the Console in Google Chrome?
    Right-click, then “inspect”, then there is a console tab and/or it is in an embedded window at the bottom of the developper tool.

  3. What does console.log function do?
    It allows to log commands in the console, thus it is not necessary to interact visually with the web page.

  4. How can you change the contents of an HTML page through the console?
    In the elements tab, you can double-click on an element an edit it on the fly.

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?
To open the Console, we can navigate to the ☰ menu in
the top right corner next to the address bar. From there, click on the Developer button symbolized by the wrench icon, which will open the Web Developer menu.

3. What does console.log function do?
Developer Console.log function provides ability to work with JavaScript in an interface similar to a terminal shell.

4. How can you change the contents of an HTML page through the console?
We can modify the sale of the page via the console to manipulate the elements content or style.

1 Like
  1. The Console provides you with the ability to write manage and monitor Javascript on demand.
  2. Select More Tools and then Developer Tools.
  3. Console.log function allows you to perform mathematical calculations.
  4. Once the Console is open you can work with Javascript to modify the content.
1 Like

What is the console used for?

To log information about a page and allows you to interact with it using JavaScript.

How do you open the Console in Google Chrome?

Shortcommando Ctrl + shift + J or go to the menu in chrome and choose more tools -> tools for developers and there you go…

What does console.log function do?

Give the developer information about any variable or result.

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

By using document command an example to change backgroundColor-> in chrome press CTRL + SHIFT + J -> document.body.style.backgroundColor = “lightblue”; -> ENTER.

1 Like
  1. Allows you to use JavaScript live via a command line environment similar to a shell interface.
  2. View -> Developer -> JavaScript Console … or, ctrl+shift+j
  3. Allows you to log outputs to the Console
  4. Commands through the console.
1 Like
  1. The console provides you with the ability to write, manage, and monitor JavaScript on-demand.
  2. 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. It logs the info of the javascript console.
  4. We can select the elements and make changes.
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.

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

x 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 if it is not highlighted already:

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 bring focus immediately to the Console.

  1. What does console.log function do?

Rather than have pop-up alerts that we need to continue to click out of, we can work with JavaScript by logging it to the Console with console.log .

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

x If you save the above HTML file, and load it into the browser of your choice, you should see a blank page with the title of the page as Today's Date .

You can then open up the Console and begin working with JavaScript to modify the page. We’ll begin by using JavaScript to insert a heading into the HTML.

let d = new Date();
document.body.innerHTML = "<h1>Today's date is " + d + "</h1>"

You’ll receive the following output on the Console:

Output
"<h1>Today's date is Sat Jun 24 2017 12:16:14 GMT-0400 (EDT)</h1>"

And at this point, your page should look similar to this:

We can also go on to modify the style of the page, such as the background color:

document.body.style.backgroundColor = "lightblue";
Output
"lightblue"

As well as the color of the text on the page:

document.body.style.color = "white";
Output
"white"

Now your page will look something like this:

From here, you can create a <p> paragraph element:

let p = document.createElement("P");

With this element created, you can then go on to create a text node that we can then add to the paragraph:

let t = document.createTextNode("Paragraph text.");

We’ll add the text node by appending it to the variable p :

p.appendChild(t);

And finally append p with its paragraph <p> element and appended text node to the document:

document.body.appendChild(p);

Once you have completed these steps, your HTML page index.html will look similar to this:

The Console provides you with a space to experiment with modifying HTML pages, but it is important to keep in mind that you’re not changing the HTML document when you do things on the Console. In this case, once you reload the page it will return to a blank document.

Understanding Other Development Tools

Depending on which browser’s development tools you use, you’ll be able to use other tools to help with your web development workflow. Let’s go over a few of these tools.

DOM — Document Object Model

Each time a web page is loaded, the browser it is in creates a D ocument O bject M odel, or DOM , of the page.

The DOM is a tree of Objects and shows the HTML elements within a hierarchical view. The DOM Tree is available to view within the Inspector panel in Firefox or the Elements panel in Chrome.

These tools enable you to inspect and edit DOM elements and also let you identify the HTML related to an aspect of a particular page. The DOM can tell you whether a text snippet or image has an ID attribute and can let you determine what that attribute’s value is.

The page that we modified above would have a DOM view that looks similar to this before we reload the page:

Additionally, you will see CSS styles in a side panel or below the DOM panel, allowing you to see what styles are being employed within the HTML document or via a CSS style sheet. This is what our sample page above’s body style looks like within the Firefox Inspector:

To live-edit a DOM node, double-click a selected element and make changes. To start, for example, you can modify an <h1> tag and make it an <h2> tag.

As with the Console, if

2 Likes
  1. The console is used for logging information during JavaScript development and testing things on your page without changing and saving the actual document.
  2. You can find the console in Chrome or Brave either using keyboard shortcut SHIFT + CTRL + J or browsing through the menu upper right-hand corner -> More Tools -> Developer Tools -> and click Console tab.
  3. Function console.log prints function’s output value into the console.
  4. You can change the contents of the HTML page by either giving JavaScript instructions in console or edit HTML elements in the Element tab.
1 Like

1] The Console is used to log information as part of the development process
2] Menu> More Tools > Developer Tools then click Console
3] Prints the outputs from scripts in the Console pane
4] Via DOM using elements tab

1 Like

1 - It allows you to execute Javascript commands within existing pages to experiment.
2 - in the menu under developer tools
3 - it adds info to the console to check what results you get
4 - by inspecting the source and double click on the HTML code you want to change

1 Like
  1. Console is used to make live changes to a website as experimentation, since changes are lost upon refreshing. It can also be used to log information.
  2. To open Console in chrome, go to top right, three dots, more tools, developer tools, and finally, console.
  3. Console.log function allows logging of Javascript information and the processing of Javascript commands within the context of the current webpage.
  4. Save the changes somewhere else.
1 Like
  1. The console is a browser command line and usually used to debug your website page and/or your javascript code
  2. You can open console in chrome from the config sub-menus ‘more tools->developer tools’
  3. the console.log outputs text to the own console so you can ‘print debug outputs’ to look at variables example.
  4. you can add and/or assign new values the html document elements
1 Like
  1. What is the console?

The Console provides the ability to write, manage, and monitor JavaScript on demand within the context of a browser; In other words, the JavaScript Console provides a space to try out JavaScript code in real time by using an environment similar to a terminal shell interface.

  1. What is the console used for?

The Console is used to log information as part of the JavaScript development process and allows interaction with a web page by carrying out JavaScript expressions within the page’s context.

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

In the Google Chrome menu, navigate to Developer Tools

  1. What does console.log function do?

console.log permits working with JavaScript by logging it to the Console

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

By using JavaScript code to modify the HTML document page

1 Like