"Another Way to Create" Bug or am I missing something?


I'm on the lesson where you re-write the susan1 object as susan2 using a constructor.

As far as I can tell I've done this correctly as shown below:

// 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();
susan.name = "Susan Jordan";
susan.age = 24;

However in the console I get:

"ReferenceError: susan is not defined"

And this error pops up:

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

It's possible I'm missing something obvious here but it seems like some kind of a bug. I've tried refreshing but it doesn't change.


You are assigning values t an empty object,

To assign a name and age you must refer to your object name which is susan2


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