title: JavaScript formatting: must braces be on the same line as the if/function/etc keyword?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3641519/why-results-varies-upon-placement-of-curly-braces-in-javascript-code">why  results varies upon placement of curly braces in javascript code</a>  </p>
  </blockquote>
  
  
  
  <p>We have company policies that dictate that in <strong>PHP</strong> opening curly braces should be on their own lines for readability and so that they can line-up with the closing brace; thus:</p>
  
  <pre><code>if (true)
  {
      ...
  }
  </code></pre>
  
  <p>but in <strong>JS</strong> they should be kept on the same line, <em>in case there are problems with browsers incorrectly interpretting it</em>.</p>
  
  <pre><code>if (true) {
      ...
  </code></pre>
  
  <p><strong>Is the above italic part a legitimate concern?</strong></p>
  
  <p>PS - I suspect that this question has been asked on here already, but I've not found a question that exactly matches mine. Apologies if it's there and I didn't find it.</p>