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 trial

JavaScript JavaScript Loops, Arrays and Objects Tracking Data Using Objects The Student Record Search Challenge Solution

What`s wrong with my code please help me..!

WTF is wrong with safari ? Same code is running properly in chrome

Hey Vineel , I think in prompt you are starting name from lowercase but in your student.js name every name store under an object of array starting from Uppercase...

    if(student.name === search.toLowerCase())   //convert search value in lowercase 

Im sorry, i forgot to update here but I did it in my browser. Anyway the same code is running in chrome not in safari whats wrong.

1 Answer

Dom Talbot
Dom Talbot
7,686 Points

Hi Vineel,

Your code isn't the problem. If you type a name in the alert box -> click ok -> then type in quit in the next alert box - you'll notice Safari has processed your code.

The reason its not updating after each alert - like Chrome - is due to how Safari works. Safari appears to be blocking the dom from loading, because it keeps getting alert boxes. - best guess is this is a performance / security feature of Safari.