title: What is the ?: syntax in JavaScript?
body: <p>what does it mean for the following line?</p>
  
  <pre><code>T = ($("#a .b").hasClass("active") ? "C" : "D") ;
  </code></pre>
  
  <p><code>$("#a .b").hasClass("active")</code> means whether <code>#a .b</code> exists? but how about <code>? "C" : "D"</code>, is it some kind of comparison logic?</p>