JSFiddle - React, Tailwind, and code Playground

by Zaheer Ahmed

HTML

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

JavaScript

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