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 trialHeather Gray
6,225 PointsOld JavaScript functions?
Why in this lesson are we not using arrow functions or other ES6 functions? I get confused because we were taught these cool new ES6 features in the previous module but they're not used.
2 Answers
Routine Poutine
26,050 PointsE6 adds 'syntactic sugar' with arrow functions, but doesn't require that you use them. Maybe in some cases it's more readable to do a function declaration or expression. That's my guess. I'm curious as to what someone more experienced might say.
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsThere are some differences between ES6 arrow functions and regular functions that are more than just syntactic sugar. I pretty much default to using arrow functions all the time now though.