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


#1


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

Fairly stumped in this one - getting error Oops, try again. Make sure to use the Object constructor. - this is what I'm doing, another I suspect I can't see for looking, but again cross referenced against others' code I cannot see where I'm going wrong


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

See if removing the space between Object and the parenthesis helps.


#3

Boom - that was it. Thanks.... I swear I tried that!

(but, maybe had another problem at the time - anyway, it works now - thanks!)


#4

np, I"m always glad to help :slight_smile:


#5

Fiz assim e deu certo!
var spencer = {
age: 22,
country: "United States"
};

// crie spencer2 aqui com notação de construtor
var spencer2 = new Object();
spencer2.age = 22;
spencer2.country = "United States";


#6

If you would like help then just create a new topic and someone should usually reply within a few minutes :slight_smile:


#7

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