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";
}
}
Salifu Sani Rich
Software Developer
Hello Mohanraj N.
inputcheckvariable used in theelseifblock is not available here (i.e not defined) because it was declared with aletkeyword in theifblock.I hope you find this useful. Cheers!!!