What's wrong with my code?


#1

The error shown is: There was a problem with your syntax

var friends = {
bill: {
firstName: "Bill",
lastName: "Gates",
number: "(206) 555-5555",
address: ['bla bla ba', '234', 'bla bla']
},
steve: {
firstName: "Steve",
lastName: "Jobs",
number: "(238) 444-4444"
address: ['bla bla apple', '210', 'bla bla bla']
}
};


#2

Good morning,

You're receiving a syntax, error, this means you did something wrong when writing your code. You specific error is unexpected identifier, which means some variation of a variable. Your error occured on line 12 of this code, which is the address property of steve, this means that address is being read unexpectedly, so there must be something wrong with the line above it.

What is that? You're missing a comma. I find it's best when running into javascript errors to first copy my script, and open up the developer tools by pressing f12, and then navigating to the console. If you're using Chrome, you can open the console in the lower half of the first window that shows by pressing Esc, otherwise navigate the tabs at the top to find it. Simply paste your script and run it, and it'll run in the browser. If there are errors it'll give you more detail than the Codeacademy program will.


#3

There are supposed to be four elements within your array, the associated value of your address property.
Example:
The array has 4 elements yours has 3.
address: ["201 E. Camino Drive", "Los Angeles", "CA", "90210"]