JavaScript explanation of ? and :
<p>I am trying to understand a line of Javascript. Hopefully someone can help me understand what this line of code means.</p>

<pre><code>var direction = this.hasClass('up') ? 'up' : 'down';
</code></pre>

<p>The bit I am interested in understanding is the <code>?</code> and <code>:</code></p>
