js checkbox code example
Example 1: dom check a checkbox
document.getElementById("myCheck").checked = true;
Example 2: checkbox value
<input type="checkbox" name="vehicle1" value="Bike">
The checkbox value is 'Bike'.
Example 3: how to check if input is checked javascript
const cb = document.getElementById('accept');
console.log(cb.checked);