If the current character has the highest value so far
if ( last [ i ] - first [ i ] > maxVal ) { maxVal = last [ i ] - first [ i ] ; ans = i ; } } return String . fromCharCode ( ans + " " . charCodeAt ( 0 ) ) ; }