10.) susan1 and susan2 do not have the same name property


#1

Can someone please explain to me why susan1 and susan2 do not have the same name property in code below?


var susan1 = {
  name: "Susan Jordan",
  age: 24
}
var susan2 = new Object();
    susan.name = "Susan Jordan",
    susan.age = 24


#2

Did you mean to use susan.name or susan2.name on this line?


#3

Ahhhh thank you! I did not know there was a difference. apparently the addition is necessary :smiley:


#4

Glad it worked out :slight_smile:


#5

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