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 trialRyan Wikle
5,774 PointsI haven't encountered the index command yet. Does anyone know where I can learn more about it?
Does anyone know where I can learn more about it?
1 Answer
Joe Elliot
5,330 PointsThis seems more confusing than it is, because the video doesn't include the necessary arguments. Check the teacher's notes for the update.
To answer: Index is not a command, it is merely an argument in the constructor, which is then referenced in the this.id
parameter. You could name this argument anything, index just made sense for the situation.