title: Dynamic JavaScript If Statement
body: <p>In PHP I can do:</p>
  
  <pre><code>// $post = 10; $logic = &gt;; $value = 100
  $valid = eval("return ($post $logic $value) ? true : false;");
  </code></pre>
  
  <p>So the statement above would return false.</p>
  
  <p>Can I do something similar in JavaScript? Thanks!</p>
  
  <p>Darren.</p>