Syntax Error, Help


Can someone tell me what's wrong with my code here? I've tried modifying the function various ways but keep getting a syntax error:

var friends = {
    bill: {firstName: "Bill", lastName: "Gates", number: "555-5555",              address: ["One Microsoft Way", "Seattle", "WA", "92392"]},
    steve: {firstName: "Steve", lastName: "Jobs", number: "444-4444",             address: ["One Apple Way", "Redmond", "WA", "93939"]},
    var list = function(friends) {
     for(var key in friends) {


I believe the problem is that you have the "var list" and the call command for list inside of the friends object. I'd suggest removing both of those and placing them outside of the body of the object.

(Side note) I would also change the parameter name for the list function to something else. Having it exactly the same as another variable could prove a hassle and may be the reason for the error.


Got it working, thanks for your help!