title: Javascript Question Mark & Double Pipes
body: <p>I am new to javascript and so far it is my understanding that:</p>
  
  <p><code>?</code> &amp; <code>:</code> is used for "if true, do this, if false do this"</p>
  
  <p>However, I am having a little more trouble with <code>||</code>. From my browsing it seems something like "if the first one is true do that, otherwise do this"</p>
  
  <p>I am trying to figure out the following code - any suggestions on what they mean together in this context?:</p>
  
  <pre><code>function isSubset(series, description){
      var subset = true;
      var exactMatch = true;
      demoCodes = ['age', 'edu', 'race', 'sex'];
      for (var i = 0; i &lt; demoCodes.length; i++){
          var demoCode = demoCodes[i];
          subset = (subset) ? (description[demoCode] == 0 || description[demoCode] == series[demoCode]) : false;
          exactMatch = (exactMatch) ? description[demoCode] == series[demoCode] : false;
      }
      return {subset: subset, exactMatch: exactMatch};
  }
  </code></pre>
  
  <p>Thanks! Cheers</p>