var slaying = true;
var youHit = Math.floor(Math.random() * 2);
var damageThisRound = Math.floor(Math.random() * 5 + 1);
var totalDamage = 0;
Here is the code.
Oops, try again. Make sure you capitalize Math in Math.floor() and Math.random()!
here is the error.
This is from learn javscript, dragon slayer.
I litteraly copied and pasted this code from the original code provided. I also ran this exact same code in the next secton of the course and it worked. (Note that the section which gave me this error was only section 2, declare your variables.)
So I have come to a conclusion that section 2 may have a bug in it?
Also note that I tried this on 2 serperate computers, on 2 seperate ip addresses. So I don't think it is just this computer.
Also note that I already tried reseting the code, and copying and pasting again.
Also note that this topic is similar to another topic about this problem that other people also had. But that topic didn't recieve too many responses. So try try again right?