2. Make sure you capitalize Math in Math.floor() and Math.random()

This is my code, what wrong?
“var slaying = true;
var youHit = Math.floor(Math.random() * 2);
var damageThisRound = Math.floor(Math.random() * 5 + 1);
var totalDamage = 0;”

If your code was meant to be

var slaying = true;
var youHit = Math.floor(Math.random() * 2);
var damageThisRound = Math.floor(Math.random() * 5 + 1);
var totalDamage = 0;

without the double-quotes-"
then you might try

++++   reset of session *****************
under certain circumstances you can shoot your _Browser_ in an
inconsistent state.

Therefor it is of an advantage to know that you have **2 _reset_ facilities**:

**One** is the use of the F5-key which does a _refresh Browser_

and

**Two**, _select&copy_ your **code**
Then use the _Reset Code_ button of the course-window,
then _paste_ your **code** back in.

**Addendum**
General Notes:
 Always refresh the browser after making corrections:
CTRL f5 ( if on Windows or Linux)
CMD r ( if on a MAC).
CTRL 0 to reset browser zoom

I apologize, I don’t know what I just read.

I totally agree with you this was useless information

I kept getting the same thing for far too long, when the syntax was just fine.
The problem turned out to be with the browser-session -

Leonhards’ suggestion is to copy the code, click ‘reset code’ (which wipes and reloads(?) to default, then paste-in the copied code and submit.
That finally worked.