I don't understand what I am doing wrong. Contact List exercise



It is giving me a syntax error. Not sure what I am doing wrong.

var friends = 
        firstName: "Bill",
        lastName: "Gates",
        number: "425-654-0084",
        address: ["Redmond, WA"]
        firstName: "Steve",
        lastName: "Jobs",
        address: ["USA"]
     var list = function (friends)
        for(var key in friends)


The problem is your list function should not be inside your var friends. Close out your friends variable before the function.


it is syntax error:
before "var" close your object " };" and dont need ";" for both } at the end of your code


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