Skip to content

Instantly share code, notes, and snippets.

@jagveerdev
Last active May 8, 2018 11:35
Show Gist options
  • Select an option

  • Save jagveerdev/f5e3e57b3db33f2ff5ac366542063091 to your computer and use it in GitHub Desktop.

Select an option

Save jagveerdev/f5e3e57b3db33f2ff5ac366542063091 to your computer and use it in GitHub Desktop.
<!doctype html>
<html>
<head>
<title>switch</title>
</head>
<body>
<script type="text/javascript">
var week=prompt("Enter Day Name");
switch(week)
{
case "Sunday":
alert("Sunday is a day of week");
break;
case "Monday":
alert("Monday is a day of week");
break;
case "Tuesday":
alert("Tuesday is a day of week");
break;
case "Wednesday":
alert("Wednesday is a day of week");
break;
case "Thursday":
alert("Thursday is a day of week");
break;
case "Friday":
alert("Friday is a day of week");
break;
case "Saturday":
alert("Saturday is a day of week");
break;
default:
{
alert("This is not a day of week");
}
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment