I need halp, It says some weird erroris there but i can't find it : function wpnChs(){
var p1 = prompt("Do you take a SWORD or a CLUB to battle?").toUpperCase();

var HP = 1;    
var EHP = 1;

var dmg = Math.floor(Math.random()* 1);

var dmgT = Math.floor(Math.random()* 1);

var first = Math.floor(Math.random()* 1);

if(p1 === "SWORD"){

HP = 10;    

EHP = 9;

dmg = Math.floor(Math.random()* 8);

dmgT = Math.floor(Math.random()* 6);

first = Math.floor(Math.random()* 3);  

}else if(p1 === "CLUB"){

HP = 11;    

EHP = 9;

dmg = Math.floor(Math.random()* 6);

dmgT = Math.floor(Math.random()* 5);  

first = Math.floor(Math.random()* 3);  

}else{

  wpnChs();

}}



function dmgD1(){

  EHP -= dmg;

}

function dmgD2(){

  HP -= dmgT;

}

function fR(){

if(p1 === "SWORD"){

dmg = Math.floor(Math.random()* 8);

dmgT = Math.floor(Math.random()* 6);

first = Math.floor(Math.random()* 3);   

}else{  

dmg = Math.floor(Math.random()* 6);

dmgT = Math.floor(Math.random()* 5);  

first = Math.floor(Math.random()* 3); 

}}





var fight = function(){

if(first === 0 || 2){

  dmgD1();

  if(dmg === 0){

    alert("You attacked, but the enemy dodged it!");

    fR();

    fight();

  }else{

   alert("You attacked and did " + dmg + " damage. The enemy now has " + EHP 

+ " health");

    if(EHP <= 0){

       alert("You killed the enemy!")

    }else{

      fR();

      fight();  

    }

  }

}else{

  dmgD2();

  if(dmgT === 0){

    alert("The enemy attacked, but you dodged it!");

    fR();

    fight();

  }else{

    alert("The enemy attacked and did " + dmgT + " damage. You now have "+ HP 

+ " health.");

    if(HP <= 0){

      alert("You died!");

    }else{

      fR();

      fight();

    }

  }

}

};





wpnChs();


fight();