Another way to create


What is wrong with this?!?!?

// Our bob object again, but made using a constructor this time
var bob = new Object(); = "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 Jordan";
susan.age = 24;

Cannot see an issue anywhere but I get the error: ReferenceError: susan is not defined.


I now know why!!!


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