It says I passed but I typed in my my answer as 'Yes' and 'I dont knows' and it printed out my else statement instead of my if statement


#1


switch(user){
    case'very weak':
      var selfEsteem=prompt("Were you hugged as a child").toLowerCase();
      var selfWorth =prompt("Are you always sad").toLowerCase();
      if(selfEsteem === "Yes"||selfWorth==="Yes"){
        console.log("No, as a matter of fact no one hugged me thats the reason I'm always sad!");
      }else{
       console.log("Then why the ■■■■ are you so weak, can you explain that then");
      }
        break;
    case'kinda weak':
       var potBelly= prompt("Do you care that you are out of shape").toLowerCase();
       var webbedToes =prompt("What are thoossseee").toLowerCase();
        if(potBelly === 'Yes'&& webbedToes === 'I dont knows'){
            console.log("If you cared about these things maybe you wouldn't be so weak");
       }else{
        console.log("Dont you lie to me you bastard.");
       }
        break;
    case'average strength I guess':
        console.log("Average enough to get you killed, STAND DOWN.");
        break;
    case'I mean Im kinda strong':
        console.log("Well ■■■■ i wasn't tryna come at you crazy or nothing");
        break;
    case'I"m strong as f**k':
        console.log("One question,can I be one of your henchmen, I didn't know you were so strong and I'm sorry if I said something out of line.");
        break;
        default:
        console.log("You didn't answer my question correctly, okay then you must be a weakling and now I'll proceed to grinding your bones to make my bread");
}


Replace this line with your code. 



#2

HI since you use both upper and down case in your if condition

if(selfEsteem === "Yes"||selfWorth==="Yes")

the Y is uppercase and the es is downcase so it's better if you remove all your .toLowerCase()


#3

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