Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMatthew Flewelling
5,221 PointsNot sure what I'm Missing on this assignement
I'm not sure I'm understanding what the question is asking me to do. I've tried everything i can think of and it keeps telling me I'm doing it wrong.
var contact = {
this.firstName: "Andrew",
this.lastName: "Chalkley"};
console.log(firstName + " " + lastName);
2 Answers
Andrew Kiernan
26,892 PointsHey Matthew!
You are on the right track. For the firstName
and lastName
properties, you don't need the this
keywords. Where you will need it is in the fullName
method (your console.log
statement will make use of this.firstName
and this.lastName
).
I hope that helps. Let me know if you have any questions!
Matthew Flewelling
5,221 PointsThanks guys! :)
Karalyn Heath
18,033 PointsKaralyn Heath
18,033 PointsI think it's the comma after "Andrew" on the second line. It should be a semi-colon.