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 trial

JavaScript Object-Oriented JavaScript (2015) Introduction to Methods Understanding this

I'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
Sara Hardy
8,650 Points

You have a typo in fullName. Remove an "L".

Unfortunately, that doesn't work. As far as I know, fullName should be spelled with two L's.

Sara Hardy
Sara Hardy
8,650 Points

Yes 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.

Right on. I'm sorry that I missed that. I appreciate your help!