var str = 'asdfssaaasasasasaa';var json = {};for (var i = 0; i < str.length; i++) { if(!json[str.charAt(i)]){ json[str.charAt(i)] = 1; }else{ json[str.charAt(i)]++; }};var iMax = 0;var iIndex = '';for(var i in json){ if(json[i]>iMax){ iMax = json[i]; iIndex = i; }}alert('The most common occurrences are:'+iIndex+'appears'+iMax+' times');The above article statistics on the number of characters with the most appearing characters in a string [Implementation Code] is all the content I have shared with you. I hope you can give you a reference and I hope you can support Wulin.com more.