What is wrong here?


#1



https://www.codecademy.com/en/courses/objects-ii/2/1?curriculum_id=506324b3a7dffd00020bf661#


Hint clearly says that parentheses will take only one argument and this.radius should be equal to that argument ergo what I have below. Any ideas ?


function Person(name,age) {
  this.name = name;
  this.age = age;
}

// Let's make bob again, using our constructor
var bob = new Person("Bob Smith", 30);
var susan = new Person("Susan Jordan", 35);

// make your own class here
function Circle(20) {
    this.radius = 20;
}


#2

Parameters can't be literal constants (defeats the purpose)


#3

Thanks buddy. I replaced 20 with radius and passed. I understand why it couldn't work. Cheers !


#4

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