var slaying = true;
var youHit = Math.floor(Math.random()*);
var damageThisRound = Math.floor(Math.random()*5+1);
var totalDamage = 0;
while( slaying ){
console.log("You're Slaying");

I don't know what is mistake in this code..but it is showing..

SyntaxError: expected expression, got ')'


HI this line

var youHit = Math.floor(Math.random()*);

try to remove the * after Math.random()


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.