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

Bug in Track: Interactive Web Pages with JS ??

Currently working on the JS track mentioned in title. The workspace environment is already provided w/ css and html files pre-filled with content. I'm following along the video tutorial, adding the JS code as I watch.

When I preview, the new functions do not work as intended.

Looking at the provided html file, I see <script type="text/javascript" src="js/app.js"></script>

File Structure: /Interactive Web Pages with JavaScript - What is an object? |-- css | |-- style.css |-- js | |-- app.js |-- index.html

Changing to the following fixes it for me and everything works fine: <script type="text/javascript" src="./js/app.js"></script>

I don't know if this is a bug or if I'm just experiencing something weird here, but I thought I would try mentioning it here and seeing what other people are experiencing.

1 Answer

For your js file

make sure you type in the directory correct

alert();

That's how i check.