1var getMax = function (str) {
2 var max = 0,
3 maxChar = '';
4 str.split('').forEach(function(char){
5 if(str.split(char).length > max) {
6 max = str.split(char).length;
7 maxChar = char;
8 }
9 });
10 return maxChar;
11};