leso9903 Posted July 16, 2013 Share Posted July 16, 2013 Hello, I'd like to know if it's possible to set several conditions for an else if statement. This I know I can do: if (X==" ") {blabla} else {} But I'd like several statements like so: if (X==" " and Y==5 and Z==6) {blabla } else {} How do I do that? Link to comment Share on other sites More sharing options...
jeffman Posted July 16, 2013 Share Posted July 16, 2013 Where you are using the word "and", use the logical and operator instead: if (X==" " && Y==5 && Z==6) { For what it's worth, the logical or operator looks like this: || Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now