10. Another Way to Create (SyntaxError -_-)


#1



SyntaxError: Parser Error
Would anyone like to help me on this one?


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

var bob = {
  name: "Bob Smith",
  age: 30
};
var susan = {
  name: "Susan Jordan",
  age: 25
};
var bob = {
var name1 = bob.name;
var age1 = bob.age;
};
var susan = {
var name2 = susan.name;
var age2 = susan.age;
};


#2

Hi there are twoo way to do an object

var object1 = {
   name : "Franck", 
   age: 0
}

or 

var object2 = new Object();
    object2.name = "franck";
    object2["age"] = 0;

#4