title: How to find the value of multiple checkboxes
body: <p>I have tried to get the value of multiple checkboxes like this:</p>
  
  <pre><code>for (const p of i.options){
          const x = document.createElement("INPUT");
          x.setAttribute("type", "checkbox");
          x.setAttribute("class", "checkboxClass");
          x.value = p;
  
          const y = document.createElement("LABEL");
          const t = document.createTextNode(p);
          y.appendChild(t);
  
  
          const div = document.createElement("div");
          div.style.height = "5px";
          div.appendChild(x);
          div.appendChild(y);
          document.getElementById("checkbox").appendChild(div);
  
          window.data.appendChild(x);
          window.data.appendChild(y);
          window.data.appendChild(div);
        }
  
  const sixthQuestion = document.querySelector('.checkboxClass:checked').value;
  </code></pre>
  
  <p>In <code>for (const p of i.options)</code> p is the text of each checkbox which is taken from a JSON file.</p>
  
  <p>I seem to be getting the value of one checkbox. How can I get the value of multiple ones? </p>
  
  <p>I am trying to avoid using <code>jQuery</code> unless its necessary to.</p>