7. Search for a name


I keep getting

error it looks like your search function doesnt return information for steve.

here is my code

var friends = {
bill: {
firstName: 'Bill',
lastName: 'Gates',
number: '(206) 555-5555',
address: ['One Microsoft Way','Redmond','WA','98052']
steve: {
firstName: 'Steve',
lastName: 'Jobs',
number: '(205) 555-5555',
address: ['Apple Bite Lane','Los Angeles','CA','87543']
var list = function(list) {
for(var key in friends) {

var search = function(friends) {
for(var key in friends) {
if(friends[key].firstname === name) {
return friends[key];



the FUNCTION talk

var myFunc = function( param1, param2) {
       //Begin of  anonymous FUNCTION-BODY
       //VARIABLE -myFunc- has an -anonymous function- assigned
       //this -anonymous function- has 2 PARAMETERS param1 and param2
       //param1 and param2 PARAMETERS are used 
       //as -local- VARIABLES throughout the FUNCTION-BODY

      console.log( param1 + " and " + param2 ) ;

      //End of anonymous FUNCTION-BODY

If you want to call/execute the anonymous function
you will have to add a pair of parentheses to the variable myFunc
As the anonymous function was defined
as having 2 parameters
you have to provide 2 arguments
in our case 2 string VALUES "Alena" and "Lauren"

some quotes from the outer-world:

**argument is the value/variable/reference being passed in,
parameter is the receiving variable used within the function/block**


**"parameters" are called "formal parameters",
while "arguments" are called "actual parameters".**


I found it on my own
i wrote

it needs to be .firstName