Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Challenge Task 1(andrew, greet, args1)
What is wrong with this code? I am following instructions and my output is the intended output.
You are doing things in the code beyond the scope of the task. You have changed the name of the variable (
greeting) that is supposed to hold the result of applying
There is no need for you to
console.log anything. Of course, you can use it while practicing, but the code challenge will check the content of a variable once the challenge is run.
The task says: Set the 'greeting' variable, on line 29, by using the 'genericGreet' function in the context of 'andrew' with the array of arguments, 'args1'.
The only change you have to do is on line 29, and you just have to expand the code there (without modifying it).
apply method on
genericGreet on that line and pass the same parameters that you've used and you will pass the code challenge.
Thanks Dino!! your explanations are so clear:)