0

Check whether a character is vowel or consonant using switch case ?

when a user enters a character and click on submit, it should say the character is vowel or consonant. eg : a is vowel.

1st Nov 2018, 3:33 AM
Bijay Bodra
Bijay Bodra - avatar
6 Answers
0
here is my code : <?php switch($vowel) { case 'a': echo "vowel";break; case 'e': echo "vowel";break case 'i': echo "vowel";break case 'o': echo "vowel";break case 'u': echo "vowel";break default: echo " this letter is consonant."; } ?> is it correct ?
2nd Nov 2018, 6:01 AM
Bijay Bodra
Bijay Bodra - avatar
0
Thank you Lexus Collins. Very much !!!
17th Nov 2018, 3:48 AM
Bijay Bodra
Bijay Bodra - avatar
0
One more thing, i want to improve my logic/problem solving skills in javascript. Do you know where can i improve ? I am very poor.
17th Nov 2018, 3:49 AM
Bijay Bodra
Bijay Bodra - avatar