Please help me, i am stuck


Why it's wrong, please help me, thank u so much !

var user=prompt("danh nhau ko?").toUpperCase();
switch(user) {
case 'co':
var khoe=prompt("may khoe chu ?").toUpperCase();
var khon=prompt("may khon chu ?").toUpperCase();
if (khoe==='YES'||khon='YES'){
console.log("may se thang!");
else {
console.log("may dut!");
case 'deo choi':
console.log("so a!");
case 'chien luon':
console.log("thang nay mau!");
case 'em xin anh a':
console.log("thang nhan gan!");
console.log("nhu khi!");


Hello @tuebmcc00532xfunix.e,

Can you attach a link to course you are on? Thanks!


I believe it may be something to do with the fact that you haven't included the keyword break in your default case. Try adding that in...


If you feel I have helped you, mark my answer as solution. Keep coding hard :smile:!


is it possibe for case to contain more values? like for ex:

case "i m good"||"almost good":
do something here


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