title: Do 'if' statements in JavaScript require curly braces?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4797286/are-curly-braces-necessary-in-one-line-statements-in-javascript">Are curly braces necessary in one line statements in JavaScript?</a>  </p>
  </blockquote>
  
  
  
  <p>I am almost positive of this, but I want to make sure to avoid faulty code. In JavaScript do single <code>if</code> statements need curly braces?</p>
  
  <pre><code>if(foo)
      bar;
  </code></pre>
  
  <p>Is this OK?</p>