Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript JavaScript Basics (Retired) Storing and Tracking Information with Variables Capturing Visitor Input

Katlyn Spears
Katlyn Spears
2,242 Points

There shows an error in the console box on my Chrome Developer Tools that shouldn't be there.

The console is showing me that there is a reference error that I can't seem to find and fix. All of the code was written as shown and there is no syntax error and nothing shows up incorrectly on the page. I wasn't sure if there was a way to fix the reference error as it has shown up through several of the videos I've followed with so far.

Hi Katlyn,

Can you post your code?

Katlyn Spears
Katlyn Spears
2,242 Points
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");

1 Answer

rydavim
rydavim
18,780 Points

You didn't post exactly what the error is, but my guess is that it goes something like, "Failed to load resource: the server responded with a status of 404 (Not Found)" with a reference to your preview url with /favicon.ico at the end.

If that is the case, it has nothing to do with your code. Chrome is looking for the favicon for your preview site. These are optional assets that are typically not included in Treehouse workspaces. If you really wanted to, you could create your own favicon and upload it into the root directory of your workspace.

Please let me know if that was not the error you're getting, and we can try and figure out what else it might be referencing. Happy coding!