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 trialnagamani palamuthi
6,160 Pointssearch record challenge- why is this not working?
pls help .I used a do while loop. dont get why not even the prompt box appearing
1 Answer
Steven Parker
231,533 PointsThere's no prompt call in student_report.js.
You'll need to add a call to that function to see the dialog box.
Also, I noticed your for loop (not a do...while loop) replaces the value in message each pass, so when you get down to the print, only the name of the very last student ("Trish") will be shown. Note that print also replaces the value of the output element, so even if you call it inside the loop, you'll still only see the last student.