Adding properties


I want to do it this way only..first initialising the friends object then adding bill and steve object into it.
And then adding each property to the objects bill and steve respectively.Please help me to complete this in the same order.Thanks

error: Oops, try again. It looks like your friends don't have the firstName property.

//Replace this line with your code. 
var friends= {};

friends.bill = {};
friends.steve = {};

bill.firstName = "Bill"
bill.lastName = "gates"
bill.number = 06183
steve.firstName = "Steve"
steve.lastName = "jobs"
steve.number = 225547


solved it . no need to answer.thanks

replaced with this.
friends.bill.firstName = "Bill"
friends.bill.lastName = "gates"
friends.bill.number = 06183
friends.steve.firstName = "Steve"
friends.steve.lastName = "jobs"
friends.steve.number = 225547


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