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 Loops, Arrays and Objects Tracking Multiple Items with Arrays Useful Array Methods

Daniel McCann
PLUS
Daniel McCann
Courses Plus Student 5,308 Points

Updating Print Function

I've been trying to update the print function myself but i have not been successful. What would be the best way to fix this. Do i need to add an event listener to the document to ensure the DOM is fully parsed?

Dave StSomeWhere
Dave StSomeWhere
19,822 Points

It will be a lot easier to help if you describe what you are trying to do, post your code and explain what isn't working.

Daniel McCann
Daniel McCann
Courses Plus Student 5,308 Points

To be more specific in the exercise for Useful Array Methods, I'm trying to duplicate the exact results from the video and get the document to update with the appropriate html based upon questions answered correctly etc. However, document.write will not display in the middle of the loop any longer, at least not in my Chrome browser. I wasn't sure if there was a way I could alter the print function Treehouse supplies to update the page in the middle of the loop.

1 Answer

Dave StSomeWhere
Dave StSomeWhere
19,822 Points

Please post your code and describe what you'd like it to do and what it is actually doing and then maybe someone in the community can help.