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 trialdominic delong
5,023 PointsI think I am over thinking this
Using DOM traversal, assign all children of the ul to the constant lis
const ul = document.getElementsByClassName('ul')[0]; const lis = ul____________
3 Answers
Ben Schroeder
22,818 PointsThe property you're looking for is .children.
Prsicilla Anesu Muzerengwa
12,577 PointsTaurai this is how you set it.
const ul = document.getElementsByClassName('ul')[0]; const lis = ul.children
mongst
10,841 Pointsconst lis = ul.children;
Takunda Muzavazi
5,380 Points.children is the property there, const lis = ul.children;
Taurai Job Munodawafa
9,877 PointsTaurai Job Munodawafa
9,877 Pointshow to i set the property