Console - Reading Assignment

1.) It allows you to log information as part of the JavaScript development process. Allows you to interact with a web page via JavaScript expressions.

2.) Go to top right of screen and click on the three vertical dots, go to More Tools, then Developer Tools. You can also use Ctrl+Shift+J on Windows.

3.) Creates a message inside the console, instead of creating a pop-up message that has to be clicked out of every time.

4.) By typing the changes you want to make into the console as though you were writing a JavaScript page. Changes will be saved if you save the page, but refreshing will clear the changes.

1 Like

Not sure where to ask for help on console.log and variables exercise, can somebody lead me to the right forum or should i just type my question here? Thank you!

1 Like

Hey @Dora_Csonka, hope you are great.

Please post your questions in this topic and will be gladly to help you :nerd_face:

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

Carlos Z.

  1. What is the console used for?
    Allows you to work with JavaScript in an interface similar to a terminal shell.
  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. 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.
  3. What does console.log function do?
    Allows the logging of our Java script that does not require our interaction to continue.
  4. How can you change the contents of an HTML page through the console?
    By providing you with the opportunity to experiment with JavaScript code within the context of an existing html file.
1 Like

Thank you Carlos!
So on the console.log and variables exercising i was doing a few more things differently but mostly the result was the same. I see now that the ‘right’ solution is a more professional and easier way than mine but made me wonder if i was wrong or just different. Here they are:
Question number 4: 1. Enter the following comment in the script: “ Now we change the value of the variable age: “. i was simply using console.log, is it another way to 'leave a comment in the script?

Question number 5, building a pyramid
my solution was: console.log(" " + “x\n” + “xxx\n” + “xxxxx”); just here, i replaced * to an x

Question number 6: instead of using (a+b) i’ve created a variable with a value as : sum= a + b so my solution was: console.log(“The sum…” + sum);
Plus, i used an addition sign + instead if a string ,

Question number 8: My souliton:
var length = 10101
var widht = 3843
console.log(“The rectangle is” + lenght + “long and” + widht + “cm wide”);

I hope you can clear this up for me, thank you for your time

2 Likes
  1. The console is a place where you can display messages as your application is running and where you can manipulate the contents of a web page.

  2. Easiest way for me is to press F12 button but also 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. It can do math calculation or display date within the console

  4. by using JavaScript code within the console

2 Likes
  1. The Console is used to log information and interact with webpages. It provides the ability to write, manage and monitor JavaScript on demand.

  2. On Mac you have three options to enter the Console.

  • Go to Chrome Settings > More Tools > Developer Tools > Console.
  • Go to View > Developer > Developer Tools > Console.
  • Press COMMAND + OPTION + J.
  1. It gives you an output of the input you’ve made, inside of the Console it self, so that you can try out JavaScript code in real-time.

  2. You have to go to the Elements tab where you will find all HTML code, then double-click on the code or content you’d like to change. Once you reload the page, the HTML code will go back to its original version.

1 Like

Your solutions are completely valid, off course there are more professional or simplest ways to achieve the same result, but that is not the goal here, the goal is that you start solving issues by your own skills and knowledge, it does not matter if is not the most efficient way, the point is that you solve it :partying_face:

In programming, is very common to have multiple ways or methods to solve the same issue, so there is no “right” answer or solution, there are always multiple and some more efficient than others :nerd_face:

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

Carlos Z.

1 Like
  1. It is used to interact with the HTML and JavaScript of the webpage allowing you to alter information. This however does not update the base HTML doc so once reloaded any changes are lost.
  2. In Mozilla it is Command + Option + K on Mac.
  3. It is a function to print a variable using JavaScript within the console.
  4. By either using a combination of functions such as document.body.append or document.create.element. You can also manually alter HTML and CSS within the “inspector” tab of the console window on Mozilla.
1 Like
  1. What is the console used for?
    The console provides us the ability to write, manage, and monitor JavaScript on demand.

  2. How do you open the Console in Google Chrome?
    Command+Alt+J.

  3. What does console.log function do?
    It enables the developer to write code in Javascript and test it.

  4. How can you change the contents of an HTML page through the console?
    The console enables us to modify, or add code to the website we are inspecting and observe the results in real time without having an impact on the original website.

1 Like

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?

Go to the menu at the top right of your browser
(the three vertical dots in a row). Select: More Tools then Developer Tools.
Click on Console along the top menu bar.

What does console.log function do?

Lets you perform math.

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

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.

1 Like

Reading Assignment: Console

  1. What is the console used for?

A Console is a development tool built into modern browsers which is used to inspect the DOM ( D ocument O bject M odel), debug, and analyze network activity. It can be used to log info and interact with a web page by carrying out JavaScript expressions within the page’s context. In other words, it gives you the ability to write, manage and monitor JavaScript on demand.

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

Navigate to the menu at the top-right of the screen, select More Tools then Developer Tools . Then in the panel you can click on Console along the top menu bar to bring up the JavaScript Console.

Shortcuts: CTRL + SHIFT + J .

  1. What does console.log function do?

The console.log function is a tool which executes any query or demand.

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

The console allows you to experiment with JavaScript code within the context of existing HTML, CSS and JavaScript. The modifications made within the console are only temporary, refreshing the page will result in it returning to its prior state. You can use JavaScript to modify and experiment with everything contained in an existing or blank HTML.

1 Like

1-console can be used to log info as part of the JS development process. It also allows you to interact with a web page by carrying out JS expressions within the page. Console lets you write, manage, and monitor JS on demand.

2- Google is evil (open menu in corner, go to more tools then to developer tools.). Brave is CTRL+SHIFT+I :smiley:

3- Console.log prints whatever is written into the console.

4- You technically cannot. You can modify it for yourself if you save it. But ultimately you cannot change the web page by using console as it will revert once you reload the 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.- F12

3.- Put info into the console if you need to want to check any variable or result.

4.- right click over the element that you want to change and select “inspect”

1 Like
  1. What is the console used for?

The Console found in your browser 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.

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

To open the console in chrome: Menu> More Tools> Developer Tools> Console

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

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

The HTML DOM is how to get, change, add, or delete HTML elements.

1 Like
  1. The console is used to provide a live “practice area” to view your output in real time

  2. To open Console in Google Chrome ; select the three buttons in top right corner, select more tools, then developer tools, finally select the console tab.

  3. The console.log function disables pop ups that would require the developer to continually click out of.

  4. To change the contents of an HTLML Page , select the Elements tab and double click the element requires modification and type in edits.

1 Like
  1. The Console is used for write, manage, monitor JS on demand within the web browser.
  2. In Chrome: Menu -> More tools -> Developer Tools
  3. Console.log allows you to log data to the console.
  4. By using the “document” element in the Console.
1 Like
  1. What is the console used for?
  • The console is used to log information a part of the JavaScript development process, as well as allow us to interact with a web page by carrying out JavaScript expressions within the page’s context. 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 console in Google Chrome, go to the menu at the top right of the browser window go to More Tools and then click Developer Tools .
  1. What does console.log function do?
  • The console.log function help the JavaScript code to solve the complicated functions with output result.
  1. How can you change the contents of an HTML page through the console?
  • To change the contents of HTML page through the console just have to change the html code in the Elements tab.
1 Like

What is the console used for?

The console provides you with the ability to write, manage, and monitor JavaScript on demand.

How do you open the Console in Google Chrome?
Go to browser menu. Select MoreTools then Developer Tools. Click on console.

What does console.log function do?
Allows you to work with JavaScript by logging it to the Console.

How can you change the contents of an HTML page through the console?
Save your HTML file and load it into a browser of your choice. You can then open up the Console and begin working with JS to modify the page.

1 Like
  1. Console is use to edit the webpage in real time. It’s temporary as if we reload the page it goes back to the html saved staged.
  2. command + option + J
  3. console.log function executes the code within the console instead of the website
  4. You can go to the elements tab an simply double clic on the code you want to change
1 Like