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 trial


Elad Ohana
Elad Ohana
24,456 Points

JavaScript and the DOM, first and last element child

Hi guys, Thought I'd show my solution to the challenge presented on https://teamtreehouse.com/library/getting-the-first-and-last-child. I broke down the "attachListItemButtons" function into the "createListButton" and added two other functions: "removeListButton" and "adjustButtons". Here is the snapshot: https://w.trhou.se/w55k0csf8u. Any feedback is appreciated!

Thanks, Elad

Guil Hernandez