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 trialAdalyn Ordono
828 PointsHow do I return a string of values within an object's method?
I seem to be having syntax and parsing problems.
var contact = {
firstName: "Andrew",
lastName: "Chalkley",
fullName: function(){
return this.firstName + this.lastName;
}
}
1 Answer
Steven Parker
231,268 PointsYou did the right thing converting the logging function into a return, but somehow in the process you lost the space that was being placed between the names as the final string is built.
Try again, but be sure to return the same string that was being logged by the original code.
Adalyn Ordono
828 PointsAdalyn Ordono
828 PointsSolved the challenge, thank you!