
Isaiah Gadson
5,171 Pointschallenge task 1 of 2 declare a variable named addy and assign it an empty object literal.
const person = { name: 'addy' }; I declared my variable, but it's coming back as wrong.What did I do wrong?
2 Answers

Cameron Childres
Treehouse Moderator 11,543 PointsHi Isaiah,
You've declared a variable named person
and assigned it an object with a property of name
and a value of 'addy'
.
Instead, the challenge wants you to "declare a variable named addy and assign it an empty object literal". To declare addy
you would type const addy
, and an empty object literal looks just like an empty pair of curly braces: {}
. The result looks like this:
const addy = {};
Hope this helps! Let me know if you have any questions.

Isaiah Gadson
5,171 Pointsit works! thanks for the help.