3 Replies Latest reply on May 29, 2007 6:30 AM by Greg Dove

    A Simple Question on the Combination of And / Or statements

    functionasform
      I know this is documented somewhere but the search terms of && and || aren't easy to browse by. If I have a statement like the following:

      if(menu() == 3 || menu() == 4 && home._visible){
      }

      Does the && statement modify both of the statements before it or just the one after the ||? If I had to use pseudo code to phrase my question, which one of these would it be:
      (condition 1 || condition 2) && condition 3
      OR
      (condition 1) || (condition2 && condition 3)