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 trialEric Trego
15,308 Pointsso do i have this right
var calculater = {
sum: 0,
add: function (value) {
this.sum += value;
}
}
var calculater is the object literal, sum is the property, add: is the key, function (value) is the method.
1 Answer
Caleb Sanchez
12,943 Pointscalculator is the object sum is a property of the calculator object. add is the key as part of the "key: value" pair - add: function the value of add is a function. add is a method you can call on the calculator object.
I think you've got it all down.
Joren Paridaens
1,602 PointsJoren Paridaens
1,602 PointsThat seems correct terminology to me!