Professional Documents
Culture Documents
Switch Demo
Switch Demo
<head>
</head>
<body>
<script>
var ch;
ch=prompt("enter any alphabet from a to z");
switch(ch)
{
case 'a':document.write("it is a vowel");
break;
case 'e':document.write("it is a vowel");
break;
case 'i':document.write("it is a vowel");
break;
case 'o':document.write("it is a vowel");
break;
case 'u':document.write("it is a vowel");
break;
default:document.write("it is a consonent");
}
</script>
</body>
</html>