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!
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 trial

saul bard
7,581 PointsI think i have it the same as the teacher but it doesnt show on the page even after i type quit?
have tried it with the print function inside and outside the while loop.
2 Answers

Kevin Gates
15,052 PointsHi there, I think your issue is here:
for (var i = 0; i < students.length; i+= 1) {
student = students [i];
if (search.name === search.toLowerCase()) {
message = getStudentReport ( student );
}
}
I believe the if statement should compare student.name
to search.toLowerCase())
.

Steven Parker
227,114 PointsThe "search" term is a simple string, it has no "name" property. You probably meant to write "student" instead:
// if (search.name === search.toLowerCase()) { // original
if (student.name === search.toLowerCase()) { // fixed