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 trialManpreet Singh
13,014 PointsConfussion in the question
what question want from me to do
var contact = {
fullName: function printFullName() {
var firstName = "Andrew";
var lastName = "Chalkley";
console.log(firstName + " " + lastName);
}
}
2 Answers
Steven Parker
231,268 PointsThis should pass task 1.
And for task 2, all you do is make the function "anonymous", which just means removing the function name. So there will be nothing between the word "function" and the parentheses "()".
nico dev
20,364 PointsI guess you refer to the second part of the challenge because it seems you've done the first part fine.
An anonymous function is a function that does not have a name, or in other words :
x: function() {
function code here
}
So all you have to do is just removing the name (i.e.: the printFullName
bit) to make it anonymous.
Manpreet Singh
13,014 Pointscan you please send me the full code