8 Replies Latest reply: Nov 16, 2012 4:22 AM by gimbal2 RSS

    how to write a if block for multiple conditions

    user575089
      Can I keep 20 conditions in a if block ? code becomes lengthy

      if(url.indexOf("saveDept")>0||(url.indexOf("saveRegion")>0) ......likewise 20 such conditions ){
      //do something

      }


      Can I make my code shorter ?