title: Create multiple elements
body: <p><strong>JavaScript</strong> </p>
  
  <pre><code>var textBlock = document.createElement('div');
  textBlock.setAttribute('class', 'finalBlock');
  
  var addFinalBlock = document.getElementsByClassName('block')[0];
  addFinalBlock.appendChild(textBlock);
  
  textBlock.innerHTML = "Make this block a text block";
  
  // -------
  var textBlock2 = document.createElement('div');
  textBlock2.setAttribute('class', 'finalBlock');
  
  var addFinalBlock2 = document.getElementsByClassName('block')[0];
  addFinalBlock2.appendChild(textBlock2);
  
  textBlock2.innerHTML = "Make this block a text block2";
  
  // -------
  var textBlock3 = document.createElement('div');
  textBlock3.setAttribute('class', 'finalBlock');
  
  var addFinalBlock3 = document.getElementsByClassName('block')[0];
  addFinalBlock3.appendChild(textBlock3);
  
  textBlock3.innerHTML = "Make this block a text block3";
  
  // -------
  var textBlock4 = document.createElement('div');
  textBlock4.setAttribute('class', 'finalBlock');
  
  var addFinalBlock4 = document.getElementsByClassName('block')[0];
  addFinalBlock4.appendChild(textBlock4);
  
  textBlock4.innerHTML = "Make this block a text block4";
  </code></pre>
  
  <p>I want to create 4 elements with different text. The class needs to remain the same. I think I am doing this with to much code.</p>
  
  <p>Maybe anyone has some information how to make this code look more beautiful and more efficient?</p>
  
  <p>Best wishes
  and thank you!</p>