What should my function look like?


#1

I can't think of what the function should look like. I tried other peoples' functions, but I only got error messages. Help!


#2

Here is a simple function that will return all the primary key names in an object:

// a function to list object keys
var list = function (object) {
    for (var key in object) {
        console.log(key);
    }
};

// call the function, passing `friends` as the object argument
list(friends);