Hello there,
Here’s how to solve this code challenge:
Now you can build the **attack**
function. First, update the **text**
message to say The <monster name> attacks.
, replacing <monster name>
with the name of the monster. Remember you can use the concatenation operator for this.
function attack() {
text.innerText = "The " + monsters[fighting].name + " attacks.";
}
Remember to add the spaces after “The” and before “attacks” to avoid getting errors.
Happy Coding Code Ninjas!! :rocket: