title: For loop will not initialize?
body: <p>Hello i am trying to loop through a set of buttons and then identify the id of that particular button.</p>
  
  <p>For some reason the for loop will not run.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function checkButton() {
   var buttons = document.getElementsByClassName("deleteButton");
  
   for (var i = 0; i &lt; buttons.length; i++) {
    buttons[i].addEventListener('click', function(e) {
      dog_id = e.target.dataset.id; 
      console.log(dog_id);
      ProcessDeleteRequest();
     }, false);
   }
  }</code></pre>
  </div>
  </div>
  </p>