title: Javascript appendChild doesn't append element and no errors in console
body: <p>I'm trying to create a 16X16 square grid using javascript. When I've tried to trouble shoot this using dev tools - there are no errors in the console but the <code>div</code>'s I'm trying to append are missing. Here's the relevant code snippets: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>window.addEventListener("onload", function () {
  
    var square = document.createElement("div")
    square.className = "square"
    var grid = document.getElementById("grid")
  
    var make_grid = function(){
      var line = 0;
      while (line &lt; 16){
        for (var i = 0; i &lt; 16; i++){
          grid.appendChild(square)
        }
        line ++;
      }
    }
  
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.square{
    width: 100px;
    height: 100px;
    border: 1px solid #000;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="container"&gt;
    &lt;div id="grid"&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Maybe I've been looking at this too long, but I can't figure out the flaw(s) in my code/logic. </p>
  
  <p>I should also point out that I know the squares aren't going to appear next to each other in a nice grid right now - I haven't added the proper css for that yet. I'd like to tackle that issue after I get SOMETHING at least appearing on my screen. </p>