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.
Rifqi Fahmi23,164 Points
what the meaning of this sentence in this video??
I still didn't understand what the meaning of this sentence in this video:
if that variable doesn't exist at all, then this conditional would generate a notice that might be visible in the browser.
anyone can explain it to me :) ?? thanks :)
Jason AndersTreehouse Moderator 145,631 Points
What Randy is trying to say is that without also checking to see if the variable is set, the conditional could return an error that could possibly show up on the website's page, which you don't want because that would confuse the visitor. Instead, you check to make sure it is set and equal to ...
So, both conditions need to be met before that block will run. Now, if it isn't set, it won't try to return a non-existent variable and won't throw an error. It will just go back to the contact screen.
Does that make sense?