write the JavaScript code to enter the day number and display the corresponding day name using switch statement
Answers
Answered by
2
Explanation:
{
var text;
varfruits=document.getElementById("myInput").value;
switch(fruits) {
case "Banana":
text = "Banana is good!";
break;
case "Orange":
text = "I am not a fan of orange.";
break;
case "Apple":
text = "How you like them apples?";
break;
default:
text = "I have never heard of that fruit...";
}
it is just an example u can do the same to set the days
Similar questions