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 trialRenan A
4,425 PointsWhat is `self`? I'm having a hard time wrapping my head around it
Where is the "click below" part to get more information about self
?
2 Answers
Nathan Barnes
Courses Plus Student 13,996 PointsRemember that the 'self' keyword means the instance acting on itself, so when you create an object and call a method that uses the self keyword within its body, then the actions within that method will be applied to the object calling the method.
Hope that clears it up.
Akash Sharma
Full Stack JavaScript Techdegree Student 14,147 PointsYou can make multiple instances of the class like table2, table3 .. tableN. so for each tableN the class methods knows its talking about the table its calling the method from not just table3.