title: not boolean value but use ||
body: <p>the below code get the window size in different browsers.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  
      &lt;p id="demo"&gt;&lt;/p&gt;
  
      &lt;script&gt;
      var w = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
      var h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
  
      var x = document.getElementById("demo");
      x.innerHTML = "Browser inner window width: " + w + ", height: " + h + ".";
      &lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I want to ask window.innerWidth OR document.documentElement.clientWidth etc.. they are not Boolean values, how can I use || to declare a variable? 
  w/h are numbers, it's like if I do the following:</p>
  
  <pre><code>var k = aaa || bbb || 45;
  </code></pre>
  
  <p>k is supposed to be a number, this is illegal, right?
  How can the first piece of code work then?
  Thanks~</p>