title: Javascript logical operators and strings/numbers
body: <p>I can't understand how logical operators works. I know how it works with boolean values, but what about strings or numbers?</p>
  
  <pre><code>2 &amp;&amp; 7
  returns 7
  
  "dog" &amp;&amp; "cat"
  returns "cat"
  </code></pre>
  
  <p>I see, that if number or strings doesn't have same value then second value is returned. But why? For what I can use it in "real world"?</p>