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 trialRobert Manolis
Treehouse Guest TeacherI'm sorry, I need help again. This js is crazy.
I don't know what to do here. Example in challenge is different from anything shown in the video tutorial. Tried a couple dozen different things, and after half an hour of fumbling like an idiot, I give up. Somebody please come to my rescue and tell me what I'm doing wrong.
2 Answers
Andrew Molloy
37,259 PointsThe video does show you, just just not quite the same method names.
So in each of the "andrew" and "ryan" vars you need to add the name method and set to the genericGreeting function. So you need to add greet: genericGreet
and remember to separate methods by commas.
Joey Vanderzee
17,978 PointsIt took me a while to get it and I had to refer back to the previous video in the series.
You are attempting to access the function genericGreet(), within your two name variables.
In the last video he mentions that when referencing an outside function, you are not calling the function, you are merely stating that it is the same. to accomplish this we drop the () from the function when we set it to our method within the variable.
So in your name variables, we will create a method greet: that references the function genericGreet.
So:
var name { greet: function }