Push to an array
outArray.push(arr2[k].charCodeAt()-64)
outArray.push(arr2[k].charCodeAt()-64)
/convert the character value to number //note we are subtracting 64 outArray.push(arr2[k].charCodeAt()-64)
Get first character from a string
function validatePalindrome(word) { //charArray = word.split; return word[0]; } //Function call console.log(validatePalindrome("BOB"));