Can someone explain what the document.getElementById(\"demo\") line does in the example below?
document.getElementById(\"demo\")
I understand getElementById gets the id of demo but the id is
document.getElementById("demo").innerHTML = voteable finds the element with the id demo and then places the voteable value into it; either too young or old enough.
document.getElementById("demo").innerHTML = voteable
voteable
So effectively becomes for example Old Enough
Old Enough