JavaScript JavaScript Basics Introducing JavaScript The Console Challenge Answer

fatimah Alabbad
fatimah Alabbad
1,972 Points

I did everything as instructed but the console did not appear , what's wrong with my cod ?

here is the code I wrote : https://w.trhou.se/bt7b6e5at

Can't view your code, could you post here?

fatimah Alabbad
fatimah Alabbad
1,972 Points

console.log("Begin program");

alert("Help me fix this program!");

alert("Can you get this message to appear?");

document.write("<h2>My first JavaScript program</h2>");

document.write("<p>I'm practicing 'debugging'.</p>");

console.log("end program");

2 Answers

Can you show me what is outputted in the browser?

You should only see

Begin program end program

This is because document.write doesn't output to browser consoles.

fatimah Alabbad
fatimah Alabbad
1,972 Points

I fixed it ^^. I was using chrome canary and change it to chrome and it appeared. maybe their was some catches or something, but thanks anyway.

You're welcome

Your code is absolutely fine. When you preview (using the eye icon in the corner) it loads in new browser tab.

If you right click on the webpage that loads and select Inspect, you will see the messages in the console of the browsers dev tools.

Hope this helps

fatimah Alabbad
fatimah Alabbad
1,972 Points

I opened the browser before and all the other codes appeared and the console.log did not appear in the console area