Constructor Notation looks perfect to me. what's going on?


"What Are Objects For?
Make a new object, spencer2, with the same properties but using constructor notation and the Object constructor."

The first object was given. It's the literal notation form of the object spencer. I tried to make the object constructor to make spencer 2 but the response is always " Oops, try again. Make sure to use the Object constructor."

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

function person(age, country) {
    this.age = age; = country;

var spencer2 = new person(22, "United States");


Custom constructors come up in a little while. Not in this lesson though. We are to demonstrate that we know how to define an object using the Object constructor.

var object2 = new Object();

Use dot notation to define the properties. = value;


That worked for me; I was overthinking it. Thank you


Thank you it has been very helpfull


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