Console - Reading Assignment

What is the console used for?
It can be used to record information as part of the JavaScript development process. Mainly the console allows you the ability to write, manage and monitor JavaScript on demand.
How do you open the console in Google Chrome?
You can navigate the menu at the top right of the browser window, indicated by three vertical dots in a row, from there more tools are selected and then processing tools, a panel opens where you can click a console along from the top menu bar so that the JavaScript console is not yet highlighted; can also be entered using the keyboard shortcut CTRL + SHIFT + J on linux or windows, or COMMAND + OPTION + J on macOs
What does the console.log function do?
Provides special treatment for DOM elements, this is useful when trying to see the full rendering of the DOM’s JavaScript object.
How can you change the content of an HTML page through the console?
HTML content can be edited by clicking or double-clicking the item tag on the tag, content, or item you want to change, and then enter the new data.

2 Likes
  1. The Console provides you with the ability to write, manage, and monitor JavaScript on demand.
  2. F12
  3. The console.log() method writes a message to the console.
  4. Inspector panel enable you to inspect and edit DOM elements.
1 Like
  1. What is the console used for?
  • You can log information during the Javascript development process. You can use the console itself for viewing command outputs.
  • You can interact with a web page by creating new elements. Working on console, though, doesn’t change the .html document, so when you reload a page, it will return to its original state.
  1. How do you open the Console in Google Chrome?

and click Console tab.

  1. What does console.log function do?
  • It brings the output of a command on the console or on the page (if the command is specified to do so).
  1. How can you change the contents of an HTML page through the console?
  • You can define style parameters like background, font size and color, etc in Javascript on the console and it will change the HTML code that browser reads at that moment.
    If we do this in the Console tab:

image

This happens in Elements tab (that is, in HTML code):

image

You can also create new elements and then append them as “child” to body:

image

which adds this to HTML:

image

One thing to mention is that Javascript is case sensitive. appendChild works, appendchild doesn’t.

1 Like

Hi @Crypto96 , I just want to add some clarification on # 4. document.createdElement() is used to create a new element. For editing, open console -> click on element-> right click on the element you want to change then you will see edit option.

1 Like

1: It’s used for writing, managing, and monitoring JavaScript on-demand.

2: -Press on 3 vertical dots in chrome
-Select more tools, then developers tools

  • in the newly opened panel, press on Console, along the top

3:let us write a message to the console and we can use this function for debugging purposes

4: by editing the HTML code in the DOM

2 Likes
  1. it allows programmers to write, manage & monitor javascript on demand in an environment similar to a terminal shell interface on the browser, also enabling the programmer to experiment with live modification to the html page without modifying the actual html document.

  2. from the main menu we go to more tools --> developer tools --> console tab or using the keyboard shortcut shift+ctrl+j for linux & windows or command+option+j on MacOS

  3. it allows you to work with javascript on the console without pop up alerts. logging the output directly in the console.

  4. by using javascript in the console tab or by editing directly on the element tab in chrome.

2 Likes

Welcome to the discussion thread about the Console. Leave your answers to the questions below in this thread. If you have any questions or you want to discuss something connected to the assignment feel free to do it in this thread as well, but please everything to the topic.

  1. What is the console used for?
    The console is used to log information as part of the JavaScript development process, which allows you to interact with a webpage by carrying out JavaScript expressions within the page’s context. More simply, the console provides one with the ability to write, manage, and monitor JavaScript on demand.
  2. How do you open the Console in Google Chrome?
    Control + Shift + J or go to the 3 dots in upper right hand corner, more tools, and developer tools.
  3. What does console.log function do?
    The JavaScript Console provides you with a space to try out JavaScript code in real time by letting you use an environment similar to a terminal shell interface. This is pretty cool in my opinion.
  4. How can you change the contents of an HTML page through the console?
    You can do this by editing the HTML code in the Document Object Model (DOM) tab.
1 Like

Excellent answer sir.
Another quick tip - To quickly access the Developer tools, you can also press the F12 key on your keyboard when on the browser.

Happy Learning :slight_smile:

1 Like
  1. ***What is the console used for?
    a console is used in browser to manage javascript

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

CTRL + SHIFT + I
3. ***What does console.log function do?

to log javascript with the console

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

open the console and modify the code there. Once refresh the page it will go back to it’s original page

1 Like
  1. 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. CTRL + SHIFT + J

  3. It logs info to the javascript console.

  4. By using the document element inside the console.

1 Like
  1. The console provides the ability to write, manage, and monitor JavaScript on demand.
  2. ctrl+shift+J
  3. Return the output to the console.
  4. By open the html file in the browser and open the Console. Then, interact with html by typing commands such as document.body.innerHTML =
1 Like
  1. The console is a developer tool that allows you to interact with your website dev process in real-time. It allows you to write, manage, and monitor your Javascript code while you try to create the desired results from your coding.
  2. Go to the top right of ur browser window to menu select more tools, then Developer Tools, then Console. or CTRL+SHIFT+J at once.
  3. Console.log allows you skip the alert process by logging it to console.log for instant feedback. So you can try out your Javascript coding in real-time.
  4. You can pull up an HTML file to ur browser and open up the console, then experiment with ur coding within the context of ur existing file. By saving the changes of context you make in the console you can modify ur HTML file.
1 Like

Didn’t quite understand the #4 question but in re-reading the page it seems u cannot permently modify ur html file, the DOM node allows u to double-click a selected element and make changes then see the change but in reloading u revert back to the saved state? if this is the way it is, console only lets u try different coding to see different results in order to see if you want to go back to ur ATOM and make the changes???

1 Like

Yes, you are absolutely right.
By modifying the HTML in your console, you are temporarily changing the HTML code. You can play around with the code and see what suits you. If you like your changes you can go back to Atom and make those changes permanently.

Console - Reading Assignment

  1. What is the console used for?
    To log information as part of the development process. Console basicall allows you to write, manage, and monitor on demand.

  2. How do you open the Console in Google Chrome?
    Main menu -> More Tools -> Developer Tools.

  3. What does console.log function do?
    Allows for real time javascript testing within a browser.

  4. How can you change the contents of an HTML page through the console?
    Using javascript, you can change attributes of the page such as background colour and font colour.

1 Like
  1. Consoles provides you with the ability to write, manage and monitor Javascript on demand.
  2. F12
  3. Logs results into the JS console. it stop pop up alerts.
  4. By going to the elements in the console and double clicking the element, Tag, attribute you want to change

1- To test & execute javascript code and interract with the active page
2- In firefox: ctrl + shift + i - I think it’s the same for Chromium!
3- log js code results within the console
4- select an element, in console double click on it or use edit element option

1 Like

What is the console used for?

  • Used to log information as part of the JavaScript development process.

  • Allows you to interact with a web page by carrying out JavaScript expressions within the page’s context.

  • Provides you with the ability to write, mange, and monitor JavaScript on demand.

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, 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.

  • On a Mac can press command + option + j.

What does console.log function do?

  • Prints the result of evaluating expressions

  • 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.

  • Allows you to use JavaScript to perform Math in the Console.

  • Can work on multiple lines with variables.

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

  • By using JavaScript inside the console to alter the webpage.
1 Like
  1. The console is a shell like interface built into any browser that allows the user to directly interact with javascript in the context of the webpage the browser is on.

  2. To open the console in Google Chrome, one must click the 3 vertical lines on the top right of the browser and click “More Tools” and then “Developer Tools”. A new set of tabs will then appear, and here you will click “Console”.

  3. console.log will run the javascript provided and provide the result in the console. It is a quick way to test and debug lines.

  4. Using the document element and the attribute id’s of the elements in the DOM, one can modify a webpage via the console.

2 Likes
  1. The JavaScript Console provides you with a space to try out JavaScript code in real time by letting you use an environment similar to a terminal shell interface.
  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. 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.
  4. 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.
2 Likes