5/6 need help!


#1

var user = prompt("What to do?").toUpperCase();

switch(user) {
case 'dressed':
console.log("Hurry up and put the your armor on!");
break;

case 'gather the Phoenix dust':
console.log("Smart just in case I get vaporized.");
break;

case 'cheap':
console.log("Up yours, that is was a cheap move!");
break;

default:
console.log("I guess that works too bud.");
break;
}

switch(life).toLowerCase() {

case 0:
if(life || 100) {
console.log("life");
}
else {
console.log("lifeless");
}
break;
}


#2

@cssmaster90864,
By using the toUpperCase() method on your prompt
the user variable will contain an UPPERCASE string.

Then your switch statement you are testing on =lowercase string='s


#3

did that still nothing


#4

@cssmaster90864,
Would you please present your newly created code...


#5

i replaced the old code with the new code above


#6

ont this line

switch(life).toLowerCase()

life is not defined and you have to take away the .toLowerCase() and put it inside the bracket like this

switch(life.toLowerCase()) // but life has to be defined

WHat @leonhard_wettengmx_n was telling you to do before was change this line

var user = prompt("What to do?").toUpperCase();

to

var user = prompt("What to do?").toLowerCase();

#7

var user = prompt("What to do?").toLowerCase();

switch(user) {
case 'dressed':
console.log("Hurry up and put the your armor on!");
break;

case 'gather the Phoenix dust':
console.log("Smart just in case I get vaporized.");
break;

case 'cheap':
console.log("Up yours, that is was a cheap move!");
break;

default:
console.log("I guess that works too bud.");
break;
}

switch("life".toLowerCase()) {

case 0:
if(health && 100) {
console.log("life");
}
else {
console.log("lifeless");
}
break;
}

Oops, try again. Make sure to use at least one logical 'or' (||)!


#8

nevermind figure it out