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

Tyler King
Tyler King
6,005 Points

I get two errors - uncaught syntax and failed to load resource 404.

The code I used is below - I did have another workspace that I deleted because I wasn't getting ANY errors at first. When I started over I got two errors. How can I fix and get one error? Thanks in advance.

alert("Hello World");
console.log("Hello from the console.";
alert("Thanks for visiting.");
document.rite("<h1> Welcome to my webpage. </h1>");

1 Answer

Steven Parker
Steven Parker
217,602 Points

The 2nd line is missing a closing parenthesis between the last quote mark and the semicolon.

The last line has "write" misspelled (missing the "w").

Tyler King
Tyler King
6,005 Points

This is the challenge where the code was supposed to be wrong to produce an error. When I wrote it, it produced the error and the failed to load resource error. I'm wondering why I got the second error.

Steven Parker
Steven Parker
217,602 Points

You forgot to provide a link to the challenge, but if you do, I'll try it myself and see what's up.

For future reference, take a look at this video about Posting a Question.