Write a program that prints the ASCII character codes for the upper case and lower-case
vowels. Hint: ASCII codes for A, E, I, O, U, a, e, i, o, u are required here
// check cosnole for check result F12
function CharacterCodesVowels(){
const arrVowels = ['A', 'E', 'I', 'O', 'U', 'a', 'e', 'i', 'o', 'u'];
for (const char of arrVowels) {
console.log( `${char}: ${char.charCodeAt()}`);
// or
//alert(`${char}: ${char.charCodeAt()}`)
}
}
CharacterCodesVowels()
Comments
Leave a comment