title: Get DOM nodes using jQuery, then output them to comma-separated string
body: <p>I'm trying to grab all DOM nodes and then output them as a string, but the output is <code>HTML Collection</code> format:</p>
  
  <pre><code>[html, head, meta, title, body, h1, p]
  </code></pre>
  
  <p>Instead, I would like to output this as a simple string:</p>
  
  <pre><code>"html, head, meta, title, body, h1, p"
  </code></pre>
  
  <p>Here is my current jQuery:</p>
  
  <pre><code>jQuery(document).ready(function($) {
      var allNodes = document.getElementsByTagName('*');
      console.log(allNodes);
  });
  </code></pre>