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

https://w.trhou.se/4ecyqt29gw

why is the word write in red.. I believe I copied as in video.

thank you

Still not working. When I Save and view box is blank https://w.trhou.se/xuw2xdmqe3

2 Answers

I 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>"); 

You 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      

Hello Kris, I deleted the original lines I entered and copy a & paste yours. I saved and viewed and dialouge box and page is blank