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
kevin hudson
Courses Plus Student 11,987 PointsNot understanding the print function inside the printList function?
I do not understand how you can get the list printed inside the <ol> tags. My guess is that you are building the HTML tags then after looping through the list up to the list length you then only need to add the </ol> tag last. Then I am assuming the print function is suppose to be short for document.write the whole listHTML variable?
1 Answer
atoniolo
9,216 PointsYou can create the li elements (with create Element method) then append them to the ol tags making them children of the ol tags. In your index.html you should have the ol tags and by bubbling the li tags should be displayed. You could create a for loop to iterate adding the li tags. Hope this helps!