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 trialPUK Dev
Courses Plus Student 3,784 Points"(e) =>" not work with me !
when i use "(e) =>" not work , i must always use function(e), could you please say , Why?
3 Answers
Kevin Korte
28,149 PointsAre you using babel? If you're trying to do this in a browser, they they can't understand (e) =>
, however if you're using babel, it will compile ES2015 into browser-compatible JS (i.e. it'll spit out function(e)
) which the browsers can read.
PUK Dev
Courses Plus Student 3,784 PointsThank you :)
Steven Parker
231,275 PointsArrow functions can't always be substituted for conventional functions. For example, they can't be used as constructors, and they don't provide several of the bindings conventional functions do (most notably "this").
For more details see this MDN page on Arrow Functions.
If that's not the issue, please show more of your code or make a snapshot of your workspace and post the link to it here.
PUK Dev
Courses Plus Student 3,784 PointsThank you :)
Henrik Christensen
Python Web Development Techdegree Student 38,322 PointsHenrik Christensen
Python Web Development Techdegree Student 38,322 Pointsneed more than "(e) =>"