Reset


#1


4.Switch


It keeps giving 'I asked you a question' even when I type yes,no or dont know.
How to fix this?


var user =prompt( "Do you support Donald trump").toUpperCase();
switch(user){
    case 'yes' :
        var ban= 
        prompt("Ok,do you support the Muslim ban?").toUpperCase();
        break;
    case 'no' :
        var protest=
        prompt("Did you took part in any protest?").toUpperCase();
        break;
    case 'Dont know' :
        var vote=
        prompt("Did you vote?").toUpperCase();
        break;
    default:
        console.log("I asked you a question");
        
}


#2

var user =prompt( "Do you support Donald trump").toUpperCase();

here you store the value to user as uppercase

but for checking you use lowercase


#3

Yeah it works now.
Thank you very much


#4

#5