title: Javascript - Checkbox checked condition
body: <p>I have a input checkbox, i want to run different block of code, when checkbox is ticked &amp; vice versa.</p>
  
  <pre><code>function checkboxEvent(){
      if checked{ ....Run this block  }
      else { ....Run this block  }
  }
  </code></pre>
  
  <p>How to identify in function whether checkbox is checked or not?</p>