What is the mistake?


#1

var friends = {};
friends.bill = {

firstName:  "Bill",
lastName : "Gates",
number:  "31111 410 5311",
address: ['One Microsoft Way','Redmond','WA','98052']

};
friends.steve = {

 firstName : "Steve",
  lastName: "Jobs",
   number :  "31111 410 5306",
 address: ['1 Infinite Loop','Cupertino','CA','95014']

};
var list = function(obj) {
for (var prob in Obj)
{
console.log(prob);
}
};


#2

There isn't a syntax error in the code, can you give me more details about what is going wrong? (what errors are occuring, etc.)


#3


#4


#5

It seems you have found a solution, tell me if you need anything else :slight_smile:


#6

i create the function "list"

but when i execute it says " did you create the function called list?"


#7

see the second image..


#8

I saw an older post of yours and thought it was a solution, my bad. On line 17, try changing Obj to obj, then see if it works.


#9

OMG!!!!! super ji.......


#10

why we are using prob key?


#11

Did that solve the problem?


#12

yes the problem is solved............:blush:


#13

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