Skip to content

getShowCounts

String.prototype.getShowCounts()

统计字符串中所有字符的出现次数。

返回值:Object

js
console.log('banana'.getShowCounts());