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 trialKap Ok
125 Pointsfunctions
What's the difference between a method and an function?
1 Answer
Jennifer Nordell
Treehouse TeacherHi! This is a very common question. Just like all thumbs are fingers but not all fingers are thumbs. The same principle applies here. All methods are functions but not all functions are methods. The term "method" is used when we're specifically talking about a function that's defined inside a class. Thus that "method" can be run on an instance of an object.
Hope this helps!
Kap Ok
125 PointsKap Ok
125 Pointsthx
Chris Tvedt
3,795 PointsChris Tvedt
3,795 PointsCould you make some examples to explain this? On example with a function that is a method and another function that is not? :)