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 trialNiall Maher
16,985 PointsUncaught ReferenceError: Media is not defined
I'm getting the following error when I try my code "Uncaught ReferenceError: Media is not defined"
Here's a screenshot of my work so hopefully someone can end my headache :/
1 Answer
Seth Kroger
56,414 PointsIn your index.html your script tag for media.js is after all the rest so it will be the last one loaded. If it's not loaded by the time the other scripts call on Media, then it will cause that error. Since it's the base class for Song and Movie it should be loaded before them.
Niall Maher
16,985 PointsNiall Maher
16,985 PointsThanks bro! Not used to using so many separate files :P