Completed it but only answer I'm getting is whatever. Please explain why


#1

var user = prompt("Input?").toUpperCase();
switch(user) {
case'Yea':
if(prompt === 'Yea'&&'Yes'){
console.log("Sweet");
}else{
console.log("hmm kay");
}
break;
case'Nah':
if(prompt === 'Nah'||'None'){
console.log("Go dash yourself");
}else{
console.log("running out of things to say");
}
break;
case'None':
console.log("This was weird");
break;
default:
console.log("Whatever");
break;
}


#2

your comparison is not good, please check here

string comparison is case-sensitive, you store the input as uppercase, but then don't do the comparison with uppercase options

the user input is stored in user, not prompt. Prompt is the build in function to prompt the input, but you store it in the user variable you created on line 1


#3

Thank you, will check out faq's more often.


#4

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