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 Pointsrecord search cahallenge
pls. chk does not display prompt box
3 Answers
Leslie Heinzen
26,662 PointsHi Nagami,
Another tiny syntax mistake, but you're missing a closing bracket -- } -- on line 14/15, so once your while loop begins, the program searches the entire document and can't find the closing bracket. If you check your console, you will see the error: "Unexpected SyntaxError: Unexpected end of input." Adding the closing bracket fixes this, allowing the program to run, and the prompt to be displayed.
However, it looks like your code is incomplete, because you're missing a chunk of code (inside the for loop on line 17) that will display the search result on the page. If you have trouble finishing the challenge, let me know!
nagamani palamuthi
6,160 Pointsok thanks for your help!
nagamani palamuthi
6,160 Pointsfirst i wanted to get the prompt box going. thanks, works now