title: How to convert HTMLCollection to string
body: <p>I'am working on a bot that will edit some form on website, one part of the form is  where is some html. I copy data from the  converting to HTMLCollection do some actions, and then i want to save it back to the . And in case to do so i need to convert HTMLCollection object back to a string. </p>
  
  <p>How i get and convert the data:</p>
  
  <pre><code>var htmlFromTextArea = document.getElementById('nameOfTextArea').value;
  var htmlObject = document.createElement('div');
  htmlObject.innerHTML = htmlFromTextArea; 
  var htmlElements = htmlObject.getElementsByTagName("*")
  </code></pre>
  
  <p>And now i need htmlElements to become string again</p>
  
  <p>I tried the following but it seems not working:</p>
  
  <pre><code>var stringWithHtmlTobeSavedInTextArea = htmlElements.text;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>var stringWithHtmlTobeSavedInTextArea = htmlElements.textContent;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>var stringWithHtmlTobeSavedInTextArea = htmlElements.innerText;
  </code></pre>