How do I check whether a checkbox checked in javascript?

// find element
let chkAgree = document.getElementById("element_id");
if(chkAgree.checked){
	// true: logic goes here
}
else{
	// false: logic goes here
}

Demo: https://jsbin.com/gudebiriki/1/edit?html,output