Consol.log does not produce results

I am using a Mac computer that has served me well for the past ten years. Before I bought my Mac, I tinkered with linux, so I have had some exposure to code. I understand the logic presented. Ivan is a great teacher. Some of the commands from the course have not produced the result that I expected. For example, the loop command “while” that I wrote in Adam would not execute. I had my teenage sons check out the code and both said that it was exactly what Ivan had typed in the video. I practice write the codes from this lesson daily because I want to memorize it. My hope is that it will work, and when it doesn’t I just double check the code, and have decided to move on. I thought that it would be OK, because we would move on past java script, and maybe the next language would work. is it solidity??

Now, we are learning more about console. I have firefox, safari, opra, and brave browsers on my laptop. All have a warning message that comes up when I open the console.

This one is from my favorite browser, brave. Is there a file I need? My OS is up to date.

Any advice would be appreciated,
Donnie

1 Like

I just saw that there’s no e

1 Like

I assume you got everything working now?

the while loop does not work.

How does it not work? Your code works for me. Do you see your <h1>? What do you see when you place a document.write outside of the while loop?

Are you saying document.write “

” text"

?

When I put this into Atom, save it to my crypto education folder, then open any web browser, navigate there, and… I have a title. Nothing else happens. Do I need to just run it in the console?

You see your title, that’s good, it means that the browser is displaying your page.

So now you should check if your script is executed at all. You can do this by adding a console.log message and/or document.write statement as the first line of the script.
The output of the document.write statement should appear on your page, the output of console.log should be in the console.

If you don’t get an output, then your script is not running.

If you do get an output, then there’s an error somewhere in your script. You can use console.log messages to find out which lines are executed or what values your variables have throughout the execution of the script.