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.

JavaScript JavaScript Basics (Retired) Introducing JavaScript The JavaScript Console

Tantalizea Lacaden
Tantalizea Lacaden
1,890 Points

Why is my alert box only appearing the first time I open the workspace?

When I open workspace and preview my javascript code, it works and the alert box appears. When I go back and edit the code, save and preview, the alert box does not appear. Why is that?

Tantalizea Lacaden
Tantalizea Lacaden
1,890 Points

I'm following the video. Here is the code:

alert("Hello, there!");
document.write("No, it works!");

I checked the console and it's still reading errors even if I saved it.

2 Answers

Tantalizea Lacaden
Tantalizea Lacaden
1,890 Points

I already passed it and I'm not sure where it is. I know the code I did is right, but I'm not sure why the issue happened. I'll let you know if I run into it again.

Thanks for the help!