title: How to get all children text separated by ; in javascript?
body: <p>I have a following problem:</p>
  
  <p>I would like to get text from all children elements separated by semicolon.</p>
  
  <p>See following example:</p>
  
  <pre><code>&lt;div class="parent"&gt;        
    &lt;div class="children 1"&gt; &lt;/div&gt;
    &lt;div class="children 2 "&gt;TEXT 2&lt;/div&gt;     
    &lt;div class="children 3 "&gt;TEXT 3&lt;/div&gt;
    &lt;div class="children 4 "&gt;TEXT 4&lt;/div&gt;                                         
  &lt;/div&gt; 
  </code></pre>
  
  <p>I know, that I can use 
  <code>document.querySelector('.parent').textContent</code> 
  to get <em>TEXT 2 TEXT 3 TEXT 4</em></p>
  
  <p>But I would like to get <em>TEXT 2;TEXT 3;TEXT 4</em> (note that before TEXT 2 is no semicolon because children 1 has no text)</p>
  
  <p>Thanks for any help!</p>