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
Lenora Tracey Amadi
2,041 PointsJavaScript
why is the word write in red.. I believe I copied as in video.
thank you
2 Answers
KRIS NIKOLAISEN
54,974 PointsI think it is orange and may be the standard workspace syntax coloring for a method in javascript. It is not indicating there is an error. But you do have one. The string in your document.write method needs closing quotes after </h1>:
document.write("<h1>Welcome to JavaScript Basis</h1>");
KRIS NIKOLAISEN
54,974 PointsYou are still missing a few things. I modified your code as follows
Before:
alert("Hello from Treehouse");
document.write("<h1>Welcome to JavaScript Basis</h1);
document.write("<h1>Welcome to JavaScript Basis</h1>
alert("Thanks for visiting)
After:
alert("Hello from Treehouse");
document.write("<h1>Welcome to JavaScript Basis</h1>"); //added closing bracket and quote
document.write("<h1>Welcome to JavaScript Basis</h1>") //added closing quote and parenthesis
alert("Thanks for visiting") //added closing quote
Lenora Tracey Amadi
2,041 PointsHello Kris, I deleted the original lines I entered and copy a & paste yours. I saved and viewed and dialouge box and page is blank
Lenora Tracey Amadi
2,041 PointsLenora Tracey Amadi
2,041 PointsStill not working. When I Save and view box is blank https://w.trhou.se/xuw2xdmqe3