title: Comparing a variable to a range of values
body: <p>In mathematics, the notation <code>18 &lt; age &lt; 30</code> denotes that age must lie between the values 18 and 30. Is it possible to use this kind of notation in the if statement? For example, I've tried executing </p>
  
  <pre><code>if(18 &lt; age &lt; 30)
  </code></pre>
  
  <p>and I get weird output, so it's not quite right. Is there a way to do this or so I simply have to write</p>
  
  <pre><code>if(age &gt; 18) /*blah*/;
  else if(age &lt; 30) /*same blah*/;
  </code></pre>