laPistola Posted November 25, 2008 Share Posted November 25, 2008 how do you write or, for exampe if (condition1) && (condition2) is do if condition1 and condition2 is true but how would you write for exmaple if (condition1) or (condition2) so it will follow the if, if condition 1 or 2 is true? i always do this buy else if's but if there is a better way then i would profer i. Thank you Quote Link to comment Share on other sites More sharing options...
br3nn4n Posted November 25, 2008 Share Posted November 25, 2008 Yay something I can answer fully!! lol if (condition1 || condition2) { //do something } Quote Link to comment Share on other sites More sharing options...
laPistola Posted November 25, 2008 Author Share Posted November 25, 2008 i thought it was || thanks for the help Quote Link to comment Share on other sites More sharing options...
mark110384 Posted November 25, 2008 Share Posted November 25, 2008 if (condtion1) { //your statement } elseif (condtion2) { //your statement } else { //Does no match condtions } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.