Stores frequency of characters
let letterCounts = new Array ( 26 ) ; for ( let i = 0 ; i < 26 ; i ++ ) { letterCounts [ i ] = 0 ; } for ( let letter = 0 ; letter < letters . length ; letter ++ ) letterCounts [ letters [ letter ] . charCodeAt ( 0 ) - ' ' . charCodeAt ( 0 ) ] ++ ;