30. What Are Objects for?


#1

https://www.codecademy.com/courses/spencer-sandbox/5/1?curriculum_id=506324b3a7dffd00020bf661#

Hello guys, so i checked the forum. Everyone is making mistake while not using the constructor. I did but it says "Make sure to use the Object constructor."
So please am i completely out of the box or did I missed something? Please help :slight_smile:

var spencer = {
  age: 22,
  country: "United States"
};

// make spencer2 here with constructor notation
function Object(age,country) {
 this.age = age;
 this.country = country;
 }
 
 var spencer2 = new Object(22,"United States");

#2

maybe you want to revisit ths exercise to remind yourself how to use constructor notation


#3

Got it, thank you :slight_smile:


#4