30 What are objects used for? problem


#1

Hello!


I'm stuck on section "30. What are objects used for?" (even though it's a review of the past 29 exercises! :-/ ).

The error message is "Make sure to use the Object constructor."

The code is:

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

// make spencer2 here with constructor notation

var spencer2 = new Object ();
spencer2.age = 22;
spencer2.country = "United States";

Any help greatly appreciated.
Thanks


#2

HI thsi line

var spencer2 = new Object ();

rmeove the space between Object and ()


#3

Sorted. Thanks, Seth.


#4

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