Adding properties


#1


https://www.codecademy.com/courses/javascript-beginner-en-3bmfN/0/4?curriculum_id=506324b3a7dffd00020bf661#

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


#2

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


#3

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