title: Javascript multiple if stops when true ignores everything else
body: <p>I have 25 IF statements that look at an image and execute different functions based upon its size and position relevant to the document size (canvas) in Photoshop. </p>
  
  <p>I'm finding that when the script executes an if that's true, it then won't continue down the stack and execute other true ifs.</p>
  
  <p>Is this a by-product of javascript, or en error on my part?</p>
  
  <p>For example, both these ifs are true but it only executes the first one. If I run the script again, it then executes the second if. But I'd like to work out how to make the script run all ifs even when one is true.</p>
  
  <pre><code>
  //bottom edge only off doc
  if (layerSmaller &amp;&amp; layerLeftIn &amp;&amp; layerRightIn &amp;&amp; layerTopIn &amp;&amp; layerBottomOut) {
      activeDocument.activeLayer.translate(0,docHeight-layerBottom+2);
      var percentageChange = ((docHeight / layerHeight) * 101);
      resizeBCenter(percentageChange) 
  }
  
  //layer smaller horizontally and right more than 65
  if (layerWidth &lt;= docWidth &amp;&amp; layerTopOut &amp;&amp; layerBottomOut &amp;&amp; layerLeftOut &amp;&amp; layerRightIn &amp;&amp; Rmargin &gt;= 65) {
     var percentageChange = ((docWidth / layerWidth) * 101);
  resizeTLeft(percentageChange) 
    app.activeDocument.selection.selectAll();
    align('AdCH');
    align('AdCV');
    app.activeDocument.selection.deselect();
  }
  </code></pre>
  
  <p>Can this be done?</p>