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 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!