Whats wrong with my code?


#1

The invalid error tells me that i have a problem in my syntax.
Syntax.error: Invalid shorthand property initializer


var object2 = {
name = "David"
};   


var object1 = new Object();
object1['name'] = "david";


var object3 = new Object(); 
object3['height'] = 65;


#2

@parthmohanty

Instead of = sign, put a : sign.


#3

Hello! Well, after the key name, you must put colons, not equal , like this

var object2= {

name : "David"
};

Bye!! :grinning: