title: Check and uncheck checkbox with vanilla javascript
body: <p>Very basic question here, I am using a <a href="https://github.com/rickellis/shortcuts" rel="nofollow noreferrer">JS library</a> to add keyboard shortcuts, I want to check and uncheck a checkbox using the same line of commands, but I am not sure about how to do this, here is the code:</p>
  <pre><code>shortcuts.add('alt+s', function() {
          document.getElementById(&quot;menu-toggle&quot;).checked = true 
      })
  </code></pre>
  <p>How can I use the same shortcut to uncheck the same element?</p>
  <pre><code>        document.getElementById(&quot;menu-toggle&quot;).checked = false; 
  </code></pre>
  <p>Thanks in advance!</p>