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

JavaScript JavaScript and the DOM (Retiring) Traversing the DOM DOM Traversal - More Review

dominic delong
dominic delong
5,023 Points

I 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
Ben Schroeder
22,818 Points

The property you're looking for is .children.

how to i set the property

Taurai this is how you set it.

const ul = document.getElementsByClassName('ul')[0];
const lis = ul.children

const lis = ul.children;

.children is the property there, const lis = ul.children;