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 trialTom Smith
6,007 PointsCould anybody please look at this with fresh eyes and tell me if you see anything I'm missing?
Could anybody please tell me if I'm missing something? For some reason, it will not print out the lists. I tried varying it up and couldn't get it so I resorted to following Dave's video, which I thought I had done exactly how he did. It works up to the point of printing out the lists, so I figure there must be something wrong with the buildList function. I have gone over it numerous times though and see no difference from his code, so I have a feeling I'm messing up something really dumb and just have looked at it too long at this point to find it LOL. If anybody could help, I'd be really, really appreciative. The console also tell me there's an infinite loop in JSbin, but that doesn't happen with Workspaces or in Sublime, so I don't think there is one. Thanks in advance! Here's my code: http://jsbin.com/jilore/1/edit?html,js,output
2 Answers
Steven Parker
231,269 Points
You're missing a closing angle on the li
tag in buildList:
listHTML += "<li" + arr[i] + "</li>"; // original line
listHTML += "<li>" + arr[i] + "</li>"; // fixed
I don't have much experience with JsBin .. But I love CodePen!
Tom Smith
6,007 PointsOMG I cannot believe after going over that section probably 50+ times it was something so simple!! Thank you SO much for pointing that out so quickly; it's been driving me insane literally for hours. Great point about CodePen also. I used that a while back but then have used JsBin a bit lately because somebody showed me something in it, but I think I will switch over to CodePen, now that you mention it. Thanks again!!