title: How can I convert an Array of elements into a NodeList?
body: <p>First things first: <strong>this isn't asking to how to turn a NodeList into an Array</strong>. This is the opposite.</p>
  
  <p>For consistency's sake, I would like to create a function that returns a NodeList, just like <code>document.querySelectorAll()</code> does. </p>
  
  <p>Here's my current code:</p>
  
  <pre><code>var toNodeList = function(arrayOfNodes){
    var fragment = document.createDocumentFragment();
    arrayOfNodes.forEach(function(item){
      fragment.appendChild(item);
    });
    return fragment.childNodes;
  };
  </code></pre>
  
  <p>However this removes the original elements from the DOM! </p>
  
  <p>How can I make a <code>NodeList</code> in a non-destructive fashion? </p>