Defining new obejcts


i have defined a new object. I have a small doubt.
24 is printed to console. whereas i havent written any console.log statement. Then why is the name karen is not printed to the console

var me=new Object();


Javascript always logs the last statement of your file, which in this case is me["age"]=24; (which returns 24). This is for debugging purposes.


thank you @nicoekkart