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 trialBryan Elliff
8,901 PointsI'm getting an error when I change the variables to properties
I don't understand why I'm getting an error. See code . . .
(btw, this is the first frame of the challenge, we don't add "this" until the next frame.)
var contact = {
firstName: "Andrew",
lastName: "Chalkley",
fulllName: function() {
console.log(firstName + " " + lastName);
}
}
3 Answers
Sara Hardy
8,650 PointsYou have a typo in fullName. Remove an "L".
Bryan Elliff
8,901 PointsUnfortunately, that doesn't work. As far as I know, fullName should be spelled with two L's.
Sara Hardy
8,650 PointsYes it should be two L's, but you have three L's in your code snippet above.
It also looks like you need to use this.firstName and this.lastName in your console.log.
Bryan Elliff
8,901 PointsRight on. I'm sorry that I missed that. I appreciate your help!