Console - Reading Assignment

Hello World,
I am having a hard time running JavaScript in ATOM.io . I downloaded the script package and I am still unable to run a javascript code (alert(“hello world”):wink: through Atom.
I looked at videos and I do not know what I am missing.
Do I need to write in and console.log (…) for javascript to run properly?
Do I need to change the save file as .js not .html ?

Thanks for the help everyone.

  1. You can use the Console to code Javascript in realtime to update your website as needed.

  2. In Google Chrome you can go to the three gray buttons in the top right corner and then navigate to More tools and then to Developer tools. The Console tab can then be selected.

  3. The console.log function writes a message to the console.

  4. You can utilize the Document Object Model to change the contents through the console.

1 Like
  1. The console is used to test out javascript code and see how it effects a webpage.
  2. click on the icon on the top right that looks like three dots stacked vertically, then more tools, then developer tools and then click on the console tab
  3. allows you to log some information like maybe a variable and value into the console.
  4. You can switch from the console tab to the elements tab then double click on any element you would like to change
1 Like

Hello @asteriskWorldChamp, hope you are great.

Now would you mind to use these topics for coding questions? I can help you with your code issue, also would be great if you share the code there.

You can use the “Preformatted Text” Button to encapsulate any kind of code you want to show.


function formatText(){

let words = “I’m a preformatted Text box, Please use me wisely!”

}

prefromatted_text-animated

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

Q1. What is the console used for?
Console is a built in development tool in a browser. It is used to work with JavaScript to log information and interact with web page elements.

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

  1. Right click on Google Home Page -> Select Inspect -> Select Console tab in the panel
  2. Click on three vertical dots -> More Tools -> Developer tools -> Select Console in the panel

Q3. What does console.log function do?
Console.log function evaluates a JavaScript expression and displays the output in Console. It can be used to display value of variables, evaluate math expressions and display etc.

Q4. How can you change the contents of an HTML page through the console?
By calling JavaScript statements, functions and changing the properties of HTML elements by utilising functions like document.body.style.color = “white”; document.createElement(“P”), etc.

1 Like

Console Reading Assignment

  1. The console is used to log information as part of the development proccess.
  2. Console is opened in Chrome via Menu-More Tools-Developer Tools
  3. The console.log function allows you to test your Javascript code
  4. Changes can be made by double-clicking a selected element or through modifying the dom objects using javascript to edit the html
1 Like
  1. The Javascript console of your web-browser can be used to execute Javascript commands within the context of a webpage and/or log information.

  2. The menu on the upper right hand conner, open Other Tools > Developer Tools and click the tab for Console

  3. It logs information to the javascript console

  4. You can interact with the pages DOM through Javascript using the “document” object and modifying it.

1 Like
  1. The console provides you the ability to write, manage and monitor javascript on demand.
  2. Menu > More Tools > Developer Tools
  3. console.log allows you to print statements in the console
  4. You can begin to work javascript to modify the elements in the HTML page.
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?

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.

  1. What does console.log function do?

Logging to the Console with console.log prevents a pop up alerts that we need to continue to click out of, when we work with JavaScript.

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

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

1 Like
  1. The console is used for programming with Javascript: to write, manage and monitore.
  2. Open a console in Google Chrome with: CTRL+SHIFT+J.
  3. Function CONSOLE.LOG displays a message on the screen.
  4. If you want to make changes on HTML through the console, you have to save changes elswhere.
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?

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.

  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.

To print the Hello, World! string, we can type the following into the Console:

console.log(“Hello, World!”);

Copy

Within the console, you’ll receive the following output:

Output

Hello, World!

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

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 = "

Today’s date is " + d + “

Copy

You’ll receive the following output on the Console:

Output

Today’s date is Sat Jun 24 2017 12:16:14 GMT-0400 (EDT)

1 Like
  1. What is the console used for?
    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 commands to log (or print out) the function’s result on the console

  4. How can you change the contents of an HTML page through the console?
    By adding elements, modifing the style of the page, change text color, background, basically edit the website.

1 Like
  1. What is the console used for?
    A: interact with elements and execute functions
  2. How do you open the Console in Google Chrome?
    A: Control+Shift+ I
  3. What does console.log function do?
    A: shows what the function is going to do in the console
  4. How can you change the contents of an HTML page through the console?
    A: by using functions that add or change the content
1 Like
  1. the console is used to experiment, change, and manage the webpage with java expressions.

  2. top right of the browser the 3 dot button, More tools then Developer tools.

  3. it allows you to log a result to the console so you don’t always have to use popups to see the output

  4. by using java expressions in the console

1 Like
  • What is the console used for? Console is used to log information from the JavaScript programs that you write, and allows interaction with a web page. It gives the ability to write, manage and monitor JavaScript on demand.

  • How do you open the Console in Google Chrome? To open the Console in Google Chrome, use the keyboard shortcut CTRL + SHIFT + J on Linux or Windows or COMMAND = option + J on macOS.

  • What does console.log function do? The console.log function writes whatever is in the () to the Console. For example,
    console.log("Hello World") will output the phrase “Hello World” to the Console.

  • How can you change the contents of an HTML page through the console? You can change the contents of an HTML page by typing JavaScript into the console. The change to the page is only temporary; when the page is reloaded, the changes disappear. Still, it is a good way to test (or debug) your code.

1 Like

Just wanna say… This course is getting VERY exciting for me!

  1. The console is used for providing the ability to write, manage and monitor JavaScript on demand.
  2. You open Console in Google Chrome by clicking the three lines menu in the top right corner and selecting the Web Developer menu and then Web Console from there.
  3. The console.log function allows you to display any particular message to the user or log any defined variables or results.
  4. You can change the contents of an HTML page in real time through the Elements tab (next to the Console tab).
1 Like
  1. The console is used for writing, managing, and monitoring the JavaScript in a browser on demand.

  2. In Google Chrome either go: top right menu > more tools > developer tools, or press Ctrl + Shift + J.

  3. Console.log function is used to output information about the JavaScript to the console, to output a string or perform maths.

  4. To change the contents of a HTML page through the console type ‘document.body.innerHTML’ and that will allow you to write HTML directly into the document body.

1 Like

1 - A console is a testing/experimental environment that provides its user the ability to write, manage, and monitor JS on demand

2- option + command + J (Mac user)

3- Console.log is a function that allows you to print/render an output

4- You can’t change the content of an HTML page from a console. A console purpose is solely to experiment and test JS code

1 Like

What is the console used for?
Log information to help the development process or debugging, also to interact with the webpage with JavaScript expressions.

How do you open the Console in Google Chrome?
Ctrl + Shift + J

What does console.log function do?
It allows developers to log the function outputs and helps to debug the code. If you have a complex function, you can show parts of the result and follow the process.

How can you change the contents of an HTML page through the console?
Opening the console you can alter the Document Object Model, that adds extra/changes the functions or the look of the page.

1 Like
  1. What is the console used for?
    Write, manage and monitor Javascript on demand
  2. How do you open the Console in Google Chrome?
    Top right, 3 vertical dots, press it. Select more tools, then developper tools, then select console. Or by pressing CTRL+shift+J
  3. What does console.log function do?
    You can work with JS by logging it to the console with console.log rather than have pop-up alerts.
  4. How can you change the contents of an HTML page through the console?
    It provides you with a space to experiment with modifying HTML pages but when you reload it returns to its original state.
1 Like