>>150
sort してから反復するとか

let a = [‘りんご’, … ];
a.sort();

let max = -1, // 最大出現回数
let count = 0, // 現在の単語の出現回数
let word, // 出現回数最大の単語

a.reduce(f);

function f(前, 次){
if(前 === 次){
count +=1
} else {
if( max < count ) { max = count; word = 前 }
count = 0;
}

みたいな感じ(細かい所は省略