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!
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
order of classes
im pretty confused. how come the Student class cannot be declared before the person class? Maybe there is something i didn't understand. I thought I understood hoisting. it was basically to define the class before calling the class. I don't see how a different order of classes affect anything as long as you call them after they are both defined. Please and Thank you for the help.
Steven Parker228,119 Points
The issue here is "dependency", which means that you should always define a class before any others that reference it. Since a
Student is a special kind of
Person needs to be defined first.