JSFiddle - React, Tailwind, and code Playground

by Zaheer Ahmed

HTML

<input type="checkbox" id="myCheckBox">My Checkbox</input>
<br/>
<br/>
<input type="button" value="Check Property Now" />

JavaScript

$('input[type="button"]').click(function () {
    if ($('#myCheckBox').is(':checked')) {
        //change it to alert('Its Checked'); if you not working with console
        console.log('Its Checked');
    } else {
        console.log('No its not Checked');
    }
});