Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

Vic Mercier
Vic Mercier
3,276 Points


Is it the same thing aren't: if(student.name === search){

} if(search ===student.name){

} MY mind is like if I say 5=8 and 8=5 so it should be the same thing with if?

1 Answer

They are the same thing. However, for things like this, just try it and use a console.log inside the if statement to see if it runs. If it does work, you learn something new.

Personally, I learned most of my Javascript just experimenting. On treehouse some valid code may not pass challenges since they want you to learn their way.