7/8 "SyntaxError: missing name after . operator"


#1

var friends = new Object();

friends.bill = new Object();
friends.bill.firstName = "Bill";
friends.bill.lastName = "Rodger";
friends.bill.number = 2;
friends.bill.address = ["42 Walaby Way", "Sydney"]

friends.steve = new Object ();
friends.steve.firstName = "Steve";
friends.steve.lastName = "Parker";
friends.steve.number = 19;
friends.steve.address = ["123 Drury Lane", "Zoo Land"]

var list = function(pe){
for(var le in pe){
console.log(le);
}
};

var search = function(name){
for(var le in friends){
if(friends.[le].firstName === name){
console.log(friends[le]);
return friends[le];
}else{
console.log("no");
}
}

I don't know what the problem is!!!


#2

var search = function(name){
 for(var le in friends){
  if(friends.[le].firstName === name){ //Not friends.[le].firstname! "friends[le]"
   console.log(friends[le]); 
   return friends[le];
  }
  else{
   console.log("no");
  }
 }
//Missing a last closing bracket on this line ending your function