Just recently started to mess around with HTML and Javascript. For some reason a javascript variable isn't displaying in the HTML code when I run the HTML code.
HTML:
<td id="solider_cost"></td>
Javascipt:
var solider_cost = 100;
document.getElementById("solider_cost").innerHTML=solider_cost
When you run the HTML code, it displays this: Image. The variable is supposed to be in that cell.
So why isn't the variable displaying in the HTML? Let me know if you need to see more code.