I assign document.getElementById("outcome").value to variable outcome.
When I click the button, I want to set value of input that has id "outcome" to "Something".
But when I execute my code below, input form outcome was not set. Still, input form outcome is nothing happened.
function throwDice() {
var point=document.getElementById("point").value;
var outcome=document.getElementById("outcome").value;
outcome=Somthing;
}
After that I modify my code right this.
function throwDice() {
var point=document.getElementById("point").value;
document.getElementById("outcome").value="Something";
}
All I do is that remove assigning variable outcome and
assign "Something" to document.getElementById("outcome").value directly.
In this case value of input form outcome is "Something".
My question is why outcome="Something" isn't operate.