30 of 33 Objects for?


30 of 33
May I know what is wrong with this code?
Thanks in advance!
var spencer = {
age: 22,
country: "United States"

// make spencer2 here with constructor notation
var spencer2 = new Objects();
spencer2.age = 22;
spencer2.country = "United States";


I feel bad replying (because I'm just learning JS myself), but in your last statement - console.log(spencer2); - it appears to me that you're not actually calling any property of the object. If I'm not mistaken, a proper call would look like:

where you can call any property of the object:
will write in the output that specified property value.


When I saw your explanation thru' email from codecademy, I realized my error. When I sat down to get thru' the lesson right now, I was able to get thru'
Thanks Jasart!


Thanks! MAKE EACH DAY...Your Masterpiece Suman


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