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 Basics (Retired) Making Decisions with Conditional Statements Review Boolean Logic

Boolean Bump

I'm not really sure what to put in that middle space between username and password. I tried true but that didn't work. Help, please, Boolean logic befuddles me greatly. D:

if ( username === '' _________ password === '') { alert("Password or user name is missing"); }

2 Answers

Hi Ashley,

The clue as to which boolean operator to use is within the alert box itself. It says "Password or user name is missing." Notice the keyword or there, so that means you need to check if either username or password are missing. The boolean operator for OR logic is two pipe symbols i.e. ||

Oh, thank you! I can't believe it was that simple. :D

I think sometimes we just overthink the solution too much haha Happy Coding, Ashley! :)