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 Loops, Arrays and Objects Tracking Multiple Items with Arrays Build a Quiz Challenge, Part 1

javascript file doesn't work

Whatever I put into the JavaScript file called quiz doesn't open. This happens often on some of my workspaces. I use Mozilla Firefox.

1 Answer

I Dilate
I Dilate
3,983 Points

Hi Sarah,

You should probably double check that you have...

  • Linked your .js file properly to your HTML page (using a <script src="pathname.js"></script> tag added usually at the end of your HTML file just before the closing </body> tag.)
  • Saved your HTML file once you've linked it.
  • Saved your .js file after you've made any changes.
  • Previewed the right file - not something left over from the last lesson. Try closing all browser windows, and opening it up from scratch.
  • Refreshed the preview page - sometimes it can help to clear your cache if you think the page isn't being properly reloaded. I use Mac Safari which forces a full refresh (load from server, not from cache) by pressing Shift + Refresh Button. I would imagine that there's a similar method in Firefox, but you'll have to Google that to find out what it is.

I hope that helps - I'd be surprised if your problem isn't caused by missing one of the steps above.

Good luck with your learning =) Rich