title: Stopping a JavaScript function when a certain condition is met
body: <p>I can't find a recommended way to stop a function part way when a given condition is met. Should I use something like <code>exit</code> or <code>break</code>?</p>
  
  <p>I am currently using this:</p>
  
  <pre><code>if ( x &gt;= 10 ) { return; }  
  // other conditions;
  </code></pre>