title: can not enter addEventListener on checkbox?
body: <p><strong>db-kepala-ruangan.js</strong></p>
  
  <pre><code> var checkbox = document.getElementsByName('checkbox');
        var dragon = document.createElement("label");
        dragon.innerHTML = "imam";
        for(var i = 0; i &lt; checkbox.length; i++){
              checkbox[i].addEventListener("change", checkedOrNot)
            }
  
            function checkedOrNot() {
              var isChecked = this.checked;
  
              if (isChecked) { //checked
                console.log('checked');
              } else { //unchecked
                console.log('unchecked');
              }
            }
  </code></pre>
  
  <p>i'm using materialize &amp; cloud firestore for this stuff.</p>
  
  <p>this is the complete project <a href="https://github.com/imamdtechnolife/simpelkes" rel="nofollow noreferrer">https://github.com/imamdtechnolife/simpelkes</a></p>