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

For some reason I am not getting the alert

For some reason I do not get the alert pop-up.

I have tried it by both including the preview.js file, and with just the script.js.

The preview.js works, but the alert does not.

https://w.trhou.se/181vrxdlqz

alert("Hey, you're back for more?");

1 Answer

Steven Parker
Steven Parker
231,153 Points

The characters surrounding the script name are not normal quotes but the "curly" variety used in word processing.

Always use these :point_right: " :point_left: not these :point_right:

Also, script loading should normally not be done in the "head" area. "Best practice" is to place "script" tags as the last thing inside the "body".

Very strange, considering that is how the lesson required it.

To add, I used " in the remainder of the lesson and everything ran perfectly fine. Not sure why it was just that particular module.