var num=2;
switch(num)
{
case 1:
document.write("Monday");
break;
case 2:
document.write("Tuesday");
break;
case 3:
document.write("Wednesday");
break;
default:
document.write("Another Day");
break;
}
Output
Tuesday
var num=2;
switch(num)
{
case 1:
document.write("Monday");
break;
case 2:
document.write("Tuesday");
break;
case 3:
document.write("Wednesday");
break;
default:
document.write("Another Day");
break;
}
Output
Tuesday
Comments
Post a Comment