title: javascript / jquery - select the larger of two numbers
body: <p>I'm trying to use javascript to select the greater of two numbers. I know I can write an if statement, but I'm wondering if there's some sort of Math operation or something to make this more efficient. Here's how I'd do it with an if statement:</p>
  
  <pre><code>if (a &gt; b) {
      c = a;
  }  
  else {
      c = b;
  }
  </code></pre>