I don't understand why it tells me "make sure use Object constructor" even when I'm using it


#1

Help Please
I don't understand why it tells me "make sure use Object constructor" even when I'm using it.


Introduction to Objects 1
30. What are Objects for?

Oops, try again. Make sure to use the Object constructor.

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

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

#2

Remove the space between Object and ().

var spencer2 = new Object();

#3

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