JSFiddle - React, Tailwind, and code Playground

HTML

<input id="check1" type="checkbox" checked="checked">
<label for="check1"> check me </label>
<p></p>

CSS

p { margin: 20px 0 0 }
b { color: blue; }

JavaScript

$("input").click(function() {
  var $input = $(this);
  $("p").html(".attr('checked'): <b>" + $input.attr('checked') + "</b><br>"
              + ".prop('checked'): <b>" + $input.prop('checked') + "</b><br>"
              + ".is(':checked'): <b>" + $input.is(':checked') ) + "</b>";
}).change();