title: How to know if a checkbox is checked
body: <p>I'm trying to test if a checkbox is checked or no I found this solution but I'm getting nothing</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>if(document.getElementById('checkbox-1').checked) {
    alert("checked");
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input id="checkbox-1" class="checkbox-custom" name="checkbox-1" type="checkbox"&gt;</code></pre>
  </div>
  </div>
  </p>