请说明代码有什么问题?
=AVG( [Jan],[Feb],[Mar], ....)
答案 0 :(得分:1)
您的变量名称为chrctr
,因此您应该检查chrctr
而不是a
。
<script>
var chrctr = prompt("Enter a character");
if (chrctr == 'a' || chrctr == 'e' || chrctr == 'i' || chrctr == 'o' || chrctr == 'u') {
document.write("Is a Vowel");
}
else {
document.write ("Is a consonant");
}
</script>