title: Jquery * Selector Query
body: <p>I know this might sound simple but somehow I am not able to understand the logic behind following piece of code</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
      &lt;head&gt;
          &lt;script src="./js/jquery-1.7.2.min.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;script&gt;
              alert("Dom Length:"+$('*').length);
              var a = "hi";
              alert($.type(a));
          &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I am getting output as Dom Length:5 but I am not understanding how the lenght is populated. </p>
  
  <p><strong>UPDATE1:</strong></p>
  
  <p>I alerady had idea that it will select all elements in DOM, counting was misleading me. One more addition to this what if I add <code>&lt;p&gt; hi &lt;/p&gt;</code> in body; it still shows length as 5. Is it right or should it be 6?</p>