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 trial

JavaScript Object-Oriented JavaScript (2015) Introduction to Methods Finishing the Calculator

2 Answers

Hi Paloma!

Please could you go ahead and post your code here in the forums? Once you do, either me or another member of the great Treehouse community will be able to help you out!

-Luke

Steven Parker
Steven Parker
231,275 Points

I don't know what you are doing wrong either, since you didn't share your code! But I can give you some general hints. Each task of the challenge asks you to implement a different method of the calculator object. The add method is already provided, as was shown in the video. It looks like this:

  add: function(value) {
    this.sum += value;        // <-- this code was added in the video to implement the add method
  }

Notice the plus (+) sign in the added code? Now if you were to add a line just like that but with a different sign you would be implementing a different kind of method. You know which symbols represent subtract, multiply, and divide, right? For each task of the challenge, try filling in the requested method with a line of code that has the symbol associated with that function instead of the plus sign.

If this hint doesn't get you through the challenge, try posting the code you were using that would not pass the "check work" test.