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.
I also have nothing showing up in the preview?
Entering all the code and the preview just shows a blank page with a blank box. No alerts, no text. I've read through the people asking the same question below but none of those solutions seemed to help... here's my code: alert("hello"); document.write(<h1>"Welcome"</h1>); alert("thank you!");
Do you have those commands within a set of script tags in the body of the document like this?
<body> <script> alert("hello"); document.write("Welcome"); alert("thank you!"); </script> </body>
Javier Alvarado16,060 Points
Did you save before you hit the preview button? I didn't see anything either until I saved the file. Make sure there isn't an orange dot by the file name so you know that it's saved.
Daniel Mejia12,481 Points
You need to add the h1 tag to the "document.write" code.
Edit: You're right Marcus Parson, I missed that. Thank you! :)
Calum Hartley6,959 Points
It prompts you with the capitalised version.