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 Practice Getters and Setters in JavaScript Practicing Getters and Setters Creating a Setter Method Solution

why won't the challenge 2 Question of practice getters and setters pass me even though I am simply copying in the answer

pretty straight forward question.

Steven Parker
Steven Parker
231,248 Points

You say you are "copying in the answer"? From where?

From the next part of the module that gives the answer. If you are really curious about this it would require inspecting the part of the course I am referring to.

2 Answers

Steven Parker
Steven Parker
231,248 Points

I tried copying and pasting from the instruction page into the challenge and it passed. When you add the task 2 code, you do leave the task 1 code in there, right?

If that's not it, try showing your actual challenge code here and perhaps we can identify the issue.

Diane Bond
Diane Bond
8,011 Points

Challenge task 2 of 2 ("Create a getter method called radius that returns the value of the backing property _radius". Helpful hint: To attack this challenge requires a constructor method for class Circle.

Hope this helps!