12. Practice makes perfect


#1

What is wrong?

var object1 = new Object();
myObj.['key1'] = value;
myObj.['key2'] = value;

var object2 = new Object();
myObj.object2 = "object2";

var object3 = new Object();
myObj.object3 = "object3";

#2

remove the dots from infront of the brackets.

and it should be in the line:

var object1 = new Object();

object1['key1'] = value;

You can't add properties to myObj because you have not defined it. At least not in the code you provided.

if you need a longer explanation it will be provided.