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!
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 trial
Create callback function challenge
'Create callback function' challenge won't pass if you use an arrow function.
Steven Parker228,105 Points
Arrow functions are not intended to be used instead of conventional functions in all situations, and in fact there are some situations where they are specifically not allowed (they cannot be used as constructors, for example). Another difference that often causes confusion is that they don't define internal variables such as "this" like conventional functions do.
For a complete description of the differences, see this MDN page.
Thank you for your answer.
I am aware of what you are saying, the thing is that I can use the arrow functions with the previous examples, but they the tests won't pass if I use them in this particular exercise.