Tell us what’s happening:
What is wrong with my code even though I used the concatenation method
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
function attack() {
text.innerText = "The" + monsters[fighting].name + "attacks.";
}
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (iPhone; CPU iPhone OS 15_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/119.0.6045.169 Mobile/15E148 Safari/604.1
Challenge Information:
Learn Basic JavaScript by Building a Role Playing Game - Step 118