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 trialrdaniels
27,258 PointsCode Challenge: Your first JavaScript Program
inside the script tags I put: <script>
document.write(<p>Welcome to JavaScript</p>);
</script> but I keep getting a parse error... and I can see in the editor that the closing p is showing an error. Any help would be appreciated
2 Answers
Jason Anders
Treehouse Moderator 145,860 PointsHey Rodney,
There are a couple of errors. First one is a syntax error: You are missing your quotation marks needed to enclose the sentence.
The second one isn't really an error in syntax, just an error in what the challenge is asking for. The challenges are picky. You wrote "Welcome to JavaScript", but the challenge wants "Welcome to my site"
The corrected line of code will be
document.write("<p>Welcome to my site</p>");
Keep Coding! :)
Colin Bell
29,679 PointsYou have to put "<p>Welcome to JavaScript</p>" in quotes;
document.write("<p>Welcome to JavaScript</p>");
rdaniels
27,258 Pointsrdaniels
27,258 PointsThank you! Exactly right!