11 Array and Object.. Missing : after Property id


#1

What's wrong ?

var my = {
my.name : 'Harvey',
my.age : '16'
};
console.log(my);

var myObj = new Object();
myObj.band = 'ATL';
myObj.game = 'DOTA';
};
console.log(myObj);

var key = {
key1 : 'Simple Plan',
key2 : 'I.T'
};
console.log(key1);


#2

my.name is how you call the name property while outside of the my object, or add the name property to it after it's been created. Inside the brackets of your constructor, all you need is the property name:

var my = {
       name:'Harvey',
};

or

var my = new Object();
my.name = 'Harvey';

Also, you have a spare closing bracket after myObj.game = 'DOTA';

And for your final line... remember when you're outside the object, you have to specify which object you're pulling the property from, like my.name