Lesson 10: Another Way to Create


I don't know what I'm doing wrong on "Another Way to Create."

// Our bob object again, but made using a constructor this time
var bob = new Object();
bob.name = "Bob Smith";
bob.age = 30;
// Here is susan1, in literal notation
var susan1 = {
name: "Susan Jordan",
age: 24
// Make a new susan2 object, using a constructor instead
var susan2 = new Object();
susan2.age = 21;
susan2.name = "Susan Jordan";


The error says..

Oops, try again. Make sure susan1 and susan2 have the same age property

It means age values of susan1 and susan2 should be same


also susan2 should be 24 not 21


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