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 Your First JavaScript Program

Alert is not coming up.

On my workspace my alert(); is not popping up. Im using chrome browser.

Tim Rach
Tim Rach
Full Stack JavaScript Techdegree Student 25,126 Points

It would be awesome to see your code so we can take a look why it´s not opening

Steven Parker
Steven Parker
208,474 Points
Jennifer Nordell
Jennifer Nordell
Treehouse Teacher

Without seeing your code, it's very difficult to say what the problem is. But let's check some basics. Make sure you've saved your file. Launch the preview and then refresh the page. If this still does not work, try clearing your browser cache and reload the page again. If none of the above work, we will need to see the code :sparkles:

2 Answers

alert(); <--- thats my code

Jennifer Nordell
Jennifer Nordell
Treehouse Teacher

If you're typing this in the console, and it still doesn't come up, then you probably need to make sure you don't have any browser extensions/pop-up blockers activated on the browser.

Try typing it directly in the console and see if it comes up without using workspaces. Keep in mind that the code in the workspace is still run in the browser.

Kevin Korte
Kevin Korte
28,103 Points

As Jennifer said, how are you entering alert()? In the console, in a script tag, in a seperate js file you're including in an html file? There is not enough info here to help you well, unfortunately.

when i use my chrome javascript console, alert(); pops up fine.

Jennifer Nordell
Jennifer Nordell
Treehouse Teacher

Ok, and just to confirm, you've cleared your browser cache and reloaded the page?