5. Logical Operators Error


#1

var user=prompt("Who are you?").toLowerCase();

switch(user){
case '1':
console.log("Kyaw Kyaw");
var answer=prompt("Yes or No?");
if(answer==Yes && answer==No){
console.log("Yes he is Kyaw Kyaw");
}else{
console.log("No, hen't not");
}
break;
case '2':
console.log("Tun Tun");
break;
case '3':
console.log("Aye Aye");
break;
default:
console.log("No One.");
}
Someone please help me. Where is the error?

Replace this line with your code.


#2

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