JavaScript JavaScript Basics Introducing JavaScript The Console Challenge Answer

Beth Osburn
PRO
Beth Osburn
Pro Student 344 Points

Console.log message did not appear when running this script console.log("Start Program");

What is error on console.log? console.log("Start 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");

Luis Magaña
Luis Magaña
12,118 Points

Hey there I copied your entire console log statements and everything worked perfectly, are you trying to do something else perhaps running all of these statements by calling the function "Start Program"? We need a little more definition to the problem and the cause thanks.

2 Answers

Steven Parker
Steven Parker
170,335 Points

Are you looking in the right place?

You know the log messages don't appear on the page, right? And they don't pop up like alerts do.

You can only see them if you have the developer's console open in your browser.

Anthony Mignona
Anthony Mignona
2,707 Points

As Steven Parker stated, it doesn't appear on the page, but in the browser's console (you can usually find it under developer tools).

Also, ensure your JavaScript file is linked to your HTML file by including it in your HTML page:

<script src="example.js"></script>