title: create multiple divs with the same class javascript
body: <p>I am new to JavaScript and would like to know how I can create multiple divs dynamically with the same class name. I have the following code but it only creates one instance of the div.</p>
  
  <pre><code>&lt;div id="wrapper"&gt;
      &lt;div id="container"&gt;
          &lt;div id="board"&gt;
              &lt;script&gt;
                  var board = document.createElement('div');
                  board.className = "blah";
  
                  for(x=0; x&lt;9;x++) {
                  document.getElementById('board').appendChild(board);
                  }
              &lt;/script&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>