title: checkbox value log "ON" instead of true or false
body: <p>I am trying to write my own code but when I console.log the in updateJSON() it gives me &quot;on&quot;</p>
  <p>I don't know why it says on. I checked the event.target and it is a checkbox but why the console logs &quot;on&quot;</p>
  <p>here is my code</p>
  <pre><code>        let task = {
              &quot;list&quot;: {
                  &quot;clean the garden&quot; : true,
                  &quot;clean the fence&quot;: true,
                  &quot;clean the room&quot;: false
              }
          }
          const div = document.getElementById(&quot;output&quot;);
          for(let key in task.list){
              //console.log(key);
              var status = !task.list[key] ? 'checked': 'unchecked'
              div.innerHTML += `
              &lt;li&gt;${key}
              &lt;input type='checkbox' ${status}&gt;
              &lt;/li&gt;
              `
          }
          const checkboxes = document.querySelectorAll('#output input[type=&quot;checkbox&quot;]');
          for(let i = 0; i &lt; checkboxes.length;i++){
              checkboxes[i].onchange = updateJSON;
          }
          function updateJSON(){
              var key = event.target.value;
              console.log(key);
          }
  </code></pre>
  <p>Not sure I understand. input type of checkbox doesn't have value but has checked or unchecked which is true or false and one is checked when I click it, it still logs on. if it is ON and OFF kind of thing, why doesn't it log OFF</p>