1.What You'll Be Building // did codecademy screw up on the code?


#1



The code provided in the example prints out all the info in friends.steve twice instead of printing out all of the info in friends.steve and then all the into in friends.bill. Is this how it's supposed to be or is it a mistake?


This is the output I get in the console when I run the default code provide in this exercise:

bill
steve
{ firstName: 'Steve',
  lastName: 'Jobs',
  number: '(408) 555-5555',
  address: [ '1 Infinite Loop', 'Cupertino', 'CA', '95014' ] }
{"firstName":"Steve","lastName":"Jobs","number":"(408) 555-5555","address":["1 Infinite Loop","Cupertino","CA","95014"]}


#2

No, Steve is printed twice because the code calls two different functions:

list(friends);
search("Steve");

They'll explain it more in depth as you go along.


#3

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