📅  最后修改于: 2022-03-11 15:04:06.978000             🧑  作者: Mango
var getMax = function (str) {
var max = 0,
maxChar = '';
str.split('').forEach(function(char){
if(str.split(char).length > max) {
max = str.split(char).length;
maxChar = char;
}
});
return maxChar;
};