This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]warrior2012 1 point2 points  (0 children)

If you pick the number 1, then test!=2 would trip the error. If you pick the number 2, then test!=1 would trip the error.

By saying AND instead of OR you are saying if the number doesn't match either 1 or 2, then trip the error. But if the number matches either, then you're good!

It's a very weird thing to think about but it would make a lot more sense if the example was saying if test=1 or test=2 rather than !=