Define a method perimeter that calculates the perimeter of a circle


When I click the "save and submit code" button, I get the following error message: 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

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


Check your spelling on this one.


Wow. That fixed it. Thanks!


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