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 trialArthur Berg
11,350 PointsI'm getting Parse Error on this code.. I've tried with and without commas. Nothing works. Any suggestions?
I get parse error, i've tried with and without commas. I've done exactly what the intructions tell me to do. Created 2 new properties and deleted the variable declarations inside the function..
2 Answers
Ferdinand Pretorius
18,705 PointsHi Arthur,
Considering the nature of this challenge, and the fact that you clearly modified the semi-colons to commas, my guess is that you didn't turn the equals ( = ) into colons( : )
But to better answer your question, please post your source code or just compare your code to the code bellow:
var contact = {
firstName : "Andrew",
lastName : "Chalkley",
fullName: function() {
console.log(firstName + " " + lastName);
}
}
Craig Garner
25,732 PointsIn console.log use this.firstName and this.lastName
akak
29,445 Pointsakak
29,445 PointsPlease post your code. Hard to tell what's wrong without looking at it.