Loop to find the maximum Repeated frequency from hash - map
var max_count = 0 , res = - 1 ; hash . forEach ( ( value , key ) => { if ( max_count < value ) { res = key ; max_count = value ; } } ) ; document . write ( " " + res + " " + max_count + " " ) ; }