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 trialjimmy bob
251 Pointsdocument.write doesen't run.
i tried to clear cache. alert("hello from treeehouse"); document.write("<h1>Welcome to JavaScript Basics</h1>");
1 Answer
Steven Parker
231,275 PointsIf by "i tried to clear cache" you mean that you added an unconditional document reload to your code, you probably have an infinite loop that prevents the document from ever being constructed.
If you do this by itself, it should work perfectly:
alert("hello from treehouse");
document.write("<h1>Welcome to JavaScript Basics</h1>");
(I removed the extra "e" from "treeehouse")