am getting the same error again n again You should use compound assignment to add the string Right! You win 20 gold!
to the end of text.innerText
.
### Your code so far
if (numbers.indexOf(guess) !== -1) {
text.innerText += " Right! You win 20 gold! ";
gold += 20;
goldText.innerText = gold;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Challenge Information:
Learn Basic JavaScript by Building a Role Playing Game - Step 173