Unexpected identifier 17/17 Arrays and Objects in JS


#1

This is my code:
var myOwnObject = {
first meal: 'breakfast'
second meal: 'lunch'
third meal: 'dinner'
};
Is there a glitch? I am doing something wrong?
Thanks for the solution!


#2

Hi, Don't use space(s) in property name. And you should put comma end of the lines in object except for the last line.

var myOwnObject = {
first_meal: 'breakfast',
second_meal: 'lunch',
third_meal: 'dinner'
};

#3

Try this one:

var myOwnObject = {
firstMeal: 'breakfast',
secondMeal: 'lunch',
thirdMeal: 'dinner'
}

Remember... capitalization!