I would like to know if there is a way to pre-set the length of the characters in the javascript prompt. So that I can enter only one character and no more
var carattere = prompt("inserte a character");
console.log(carattere);
if (carattere=="a" || carattere=="e" || carattere=="i" || carattere=="o" || carattere=="u") {
window.alert("the character is a Vowel");
}else if(carattere=="y"){
window.alert("Y can be consonant or vowel");
}else{
window.alert("the character is a consonant");
}