Why does the screen only log the last value?



My code behaves correctly I'm just curious as to why it only logs my name: "Matthew" and not my age: 32? Just a curiosity question. Thanks

var me = new Object();

me["age"] = 32;
me["name"] = "Matthew"


the codecademy console just logs the last value. If you want to log more, use console.log()


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.