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

Adam Berkowitz
2,673 PointsConfused by self (not in the psychological/philosophical sense)
I've been working through the tutorials and I'm still really confused by how "self" gets used. I feel like it should be obvious, but I also feel like I'm missing something. As best I can figure out it's used to refer to an instance or a class you want to call a method on. Am I on the right track?
3 Answers

Stone Preston
42,016 Pointsself refers the instance of the class thats receiving the message or method call.

Holger Liesegang
50,595 PointsHi Adam,
Stone's definition is precise and absolutely right but you also might want to have a look at Self Keyword

Adam Berkowitz
2,673 PointsThank you both very much. I've been away from my computer for a few days. I'll check out the Self Keyword link soon.