JSFiddle - React, Tailwind, and code Playground

by Zaheer Ahmed

HTML

<input type="checkbox" id="myCheckBox" > My Checkbox </input>

<br/><br/>
<input type="button" onclick='checkCheckBox()' value="Check Property Now" />

JavaScript

function checkCheckBox() {
    if (document.getElementById('myCheckBox').checked) {
        //change it to alert('Its Checked'); if you not working with console
        console.log('Its Checked');
    } else {
        console.log('No its not Checked');
    }
}