"ABC".charCodeAt(0) // returns 65
String.fromCharCode(97); // --> 'a'
'a'.charCodeAt(0)//returns 97, where '0' is the index of the string 'a'
var res = "A".charCodeAt(); //returns 65
const StringToASCII = (str) => [...str].map((char) => char.charCodeAt(0));
const character = String.fromCharCode(67);
console.log(character); // "C"
word = userInput[0]; //abc
var sum =0;
for(i=0;i<word.length;i++)
{
sum = sum + word.charCodeAt(i);
}
console.log(sum); //294
var x = 'B';
var ascii_code = x.charCodeAt(0);
console.log(ascii_code);
String.fromCharCode(65,66,67); // returns 'ABC'
const vowels = []
for (let i = 1; i <= 26; i++) {
let values = i - 1
let keys = 64 + i
if (values <= 25) {
vowels.push({ [`${String.fromCharCode(keys)}`]: values })
}
}