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

Trent Sturgill
Trent Sturgill
2,441 Points

First "alert" works....second one does not! What am I doing wrong?

Hello all,

Please see the link for my workspace:

https://w.trhou.se/ld78kl2sk1

Anybody have any idea why my second alert wouldn't be popping up? I've checked my code at least a dozen times, and still no avail. Thanks in advance!

4 Answers

Laurie Williams
Laurie Williams
10,174 Points

I think my browser is caching the page. Check your cache.

I've confirmed this with Safari, so this may be true for other browsers as well - sometimes the browser will cache your code.

  1. Select Safari > Clear History and Website Data...
  2. Select "the last hour" from the dropdown menu and click "Clear History" to confirm.
  3. Click the preview icon in your workspace again.

Your script worked fine in my JS console in Chrome.

Working fine for me also

John McCall
John McCall
2,630 Points

Do you have some sort of pop-up blocker? Chrome asks me if I want to disable "alerts" from this page....