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 Data Using Objects The Build an Object Challenge, Part 2 Solution

lagah rajan
lagah rajan
1,741 Points

how student_report knows about student data structure . We do not tell or link student_report about student

i was thinking we must add something in student_report program that will tell it about student data structure it is using or going to use. But it is not so, now plz tell me logic behind this.

1 Answer

He vaguely explains why starting at the 0:50 second mark. Basically, when it comes to javascript, any .js files linked previously are available to the ones after. Think of it as one giant file starting at the first script tag in your index.html. Because the student_report is linked after students, you are able to access the students information.

lagah rajan
lagah rajan
1,741 Points

o thanks sir.I missed it in video . U make me clear.