title: How to write an inline IF statement in JavaScript?
body: <p>How can I use an inline <code>if</code> statement in JavaScript? Is there an inline <code>else</code> statement too?</p>
  
  <p>Something like this:</p>
  
  <pre><code>var a = 2;
  var b = 3;
  
  if(a &lt; b) {
      // do something
  }
  </code></pre>