I passed but I can not get answer what I want



<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>
I can not get answer what I want, please help me fix it out

``` var user = prompt("how do you think about Su? yes, smart, rich, hansome,genius").toUpperCase();

case ‘yes’:
if( “yes”&&“so hot” || !“no”){
console.log(“I know that”);
else{ console.log(“please answer from the examples”)
case ‘smart’:
console.log(“Su can speak 3 languages”);

case 'rich' :
    console.log("he can makes billion dollar because he is smart");
case 'hansome' :
    console.log("many girls like him");
case 'genius' :
    console.log("he can speak 3 languages and can do many things! he is genius");
    console.log("please answer from the examples")


<do not remove the three backticks above>


You convert to uppercase at the end of this line:

var user = prompt("how do you think about Su? yes, smart, rich, hansome,genius").toUpperCase();

and then you compare with lowercase cases (yes, smart and so on)

I would change toUpperCase(); to toLowerCase();


can you tell me what’s the difference touppercase with lower case?


Use the toLowerCase() Method in your prompt
You will have to change the condition

( "yes"&&"so hot" || !"no")


can you tell me the difference with uppercase??





switch (parameter-expression) {
  case value1:
    //Statements executed 
    //      when the VALUE of expression matches value1
  case value2:
     //Statements executed 
    //      when the VALUE of expression matches value2
  case valueN:
    //Statements executed 
    //      when the VALUE of expression matches valueN
    //Statements executed 
    //      when none of the VALUE's match the VALUE of the expression

= = = = = = = = = = = = = = = = = = = = = = = = = = = =

The switch statement evaluates an parameter-expression,
matching the parameter-expression’s VALUE to a case clause,
and executes statements associated with that case.
( and with the break or return-statement will exit the switch statement )

= = = = = = = = = = = = = = = = = = = = = = = = = = = =

In your case clause you are using an expression
An expression is any valid unit of code that resolves to a VALUE.

Conceptually, there are two types of expressions:
-1 those that assign a value to a variable
2- those that simply resolve to a VALUE.

So in your case clause you are using the 2nd kind of expression
and you do that by
using the _toLowerCase() Method on the string of the prompt-Result
which will result in a lowercase string VALUE

Thus your case clause VALUE (being a lowercase string)
is matched against the VALUE of the parameter-expression


well, toUpperCase obviously converts the string to UPPERCASE LETTERS
and toLowerCase converts them to lowercase letters

String comparison is case sensitive.


There are a few problems I see in your code. As the guys here have already said you need to change .toUpperCase into .toLowerCase. All your conditions are in lowercase. “NO” does not equal “no”.

Let’s say the prompt input was “aEzAkMi”:
.toUpperCase converts the string into “AEZAKMI”
.toLowerCase will convert into “aezakmi”

Another thing:
Your first case has no break.
The code will run your second case too, if there is no break.


( "yes"&&"so hot" || !"no")

This condition in your 1st case is a mess. I have no idea what you wanted to achieve.



You’ll need a break so if the condition doesn’t match this case, then they’ll stop executing the rest of the code to go over the next case.