var str = 'aaaaabbbbcccdde';
var obj = {};
for(var i of str){
if(obj.hasOwnProperty(i)){
obj[i]++;
}else{
obj[i]=1;
}
}
var max = 0;
var char = '';
for( item in obj){
if(obj[item]>max){
max = obj[item];
char = item;
}
}
console.log(max,char);
网友评论