How to check if chekcbox is checked : <p>I have a table where each row has a checkbox inside.</p>

<pre><code>&lt;input type="checkbox" onclick="handleClickOnReduce(this)" checked=""&gt;
</code></pre>

<p>The handler works like this:</p>

<pre><code>function handleClickOnReduce (dom) {
  console.log(dom)
  if (dom.checked === 'true') {
    console.log('checked')
  }
  if (dom.toString().includes('checked')) {
    console.log('checked')
  }
  if (stompClient) {
    var chatMessage = {
      sender: 'userRequest',
      content: [dom.parentElement.id],
      type: 'REDUCE'
    }
    stompClient.send('/app/chat.sendMessage', {}, JSON.stringify(chatMessage))
  }
}
</code></pre>

<p>You can see already what my question is about. I try to figure out if the checkbox of the caller of the handleClockOnReduce function is checked or unchecked.</p>

<p>Any idea?</p>
