📌  相关文章
📜  辅音 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:45.190000             🧑  作者: Mango

代码示例2
var input = prompt("Enter a character:");
if (input == 'a' || input == 'A' || input == 'e' || input == 'E' || input == 'i' || input == 'I' || input == 'o' || input == 'O' || input == 'u' || input == 'U') {
console.log("Its a vowel");
} else if ((input >= 'a' && input <= 'z') || (input >= 'A' && input <= 'Z')) {
  console.log("Its a consonant");
} else {
    console.log("Invalid input please enter an alphabet");
 }