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.

JavaScript JavaScript and the DOM (Retiring) Traversing the DOM Getting the First and Last Child

Heather Gray
Heather Gray
6,225 Points

Old 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
Routine Poutine
26,038 Points

E6 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.