11. class is in session


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
Circle (radius) {
this.radius = radius;

var Circle = function(radius) {
this.radius = radius;

Can anyone explain me what I'm doing wrong? It keeps saying: Oops, try again. There was a problem with your syntax.


This doesn't need to be in your code

And here you are creating an object so you should write,

function Circle (radius) {


Which part do you mean?


The line that has this code, should not be part of your code.

And here,

Should be written like this,

function Circle(radius) {


Thank you. I think I need to practice more with this part.


Has it worked though? :slight_smile:


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