Error Undetermined String Constant


#1

var type = prompt('What class are you? Warrior, Mage, or Rogue?').toUpperCase();
var weapon = prompt('Are you armed with a Sword, Wand, or Dagger?').toUpperCase();

switch(type)
{
case 'WARRIOR':
console.log("You are a Warrior");
if(weapon === "SWORD")
{
console.log("Great choice of weapon for your class");
}else if(weapon === "WAND")
{
console.log("Poor choice of weapon for your class");
}else if(weapon === "DAGGER")
{
console.log("Not the best choice of weapon, but it will work");
}else{
console.log("Apparently you don't want a weapon...");
}
break;
case 'MAGE':
console.log("You are a Mage");
if(weapon === "SWORD")
{
console.log("A battle mage is a powerful class");
}else if(weapon === "WAND")
{
console.log("Great choice of weapon for your class");
}else if(weapon === "DAGGER")
{
console.log("This is not the best weapon for your class...");
}else{
console.log("Apparently you don't want a weapon...");
}
break;
case 'Rogue':
console.log("You are a Rogue");
if(weapon === "SWORD")
{
console.log("A sword will not serve you well if stealth is your tactic");
}else if(weapon === "WAND")
{
console.log("The wand is just a stick in your hand, poor choice");
}else if(weapon === DAGGER")
{
console.log("Great choice of weapon for your class");
}else{
console.log("Apparently you don't want a weapon...");
}
break;
default:
console.log("Unless you want to be a simple human pick again...");
break;
};


#2
weapon === DAGGER"

string inside quote!
your code work just fine.
just put quote before dagger