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 trialSeab Jackson
5,692 PointsMadlibs and For Loop
I know that the instructor indicated that we may cover loops in a later stage of the course, but I was wondering how one might approach this coding exercise using the for loop.
Tyler Hogstrom
2,705 PointsTyler Hogstrom
2,705 PointsI was thinking about this too! I think you might need an array and a for loop. Actually, I just did some hacking and needed two arrays.
You could always add all of the sentence frills to polish it up, but you end up with an array filled with the users answer. I don't know if this is the most elegant way to do this, but I've only done a little of the JavaScript course so it's what I could manage.