Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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

18,814 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!