Cannot read property 'checked' of null
function tick(id) { let newid = 'inputtext'+id; let inputcheck = 'inputcheck'+id; var check = document.getElementById(newid); if (document.getElementById(inputcheck).checked ) { check.style = "text-decoration: line-through"; }
else if(document.getElementById(inputcheck).checked = false) {
check.style = "text-decoration: none";
}
}