33.Methods need help cant find where i did wrong


#1

https://www.codecademy.com/en/courses/spencer-sandbox/5/4?curriculum_id=506324b3a7dffd00020bf661#

Oops, try again. Your code caused a TypeError when trying to call .perimeter(). Make sure you have properly defined the perimeter method. Use the .area() method as a guide. Here's the error message: TypeError: c.perimeter is not a function


Replace this line with your code. 

function Circle (radius) {
    this.radius = radius;
    this.area = function () {
        return Math.PI * this.radius * this.radius;
        
    };
    // define a perimeter method here
    
};
this.perimeter = function () {
    return Math.PI * 2 * this.radius;
};


#2

never mind solved it
// define a perimeter method here

};

this part made it didnt work


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.