11 Array and Object.. Missing : after Property id


What's wrong ?

var my = {
my.name : 'Harvey',
my.age : '16'

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

var key = {
key1 : 'Simple Plan',
key2 : 'I.T'


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 = {


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