上代码:
[...'aaaaabbbcccccccc'].reduce((a,b) => (a[b] ? (a[b]++) : (a[b] = 1), a),{})
看结果:
标签:...,代码,reduce,一行,次数,字符串 From: https://www.cnblogs.com/zaijin-yang/p/17187014.html
上代码:
[...'aaaaabbbcccccccc'].reduce((a,b) => (a[b] ? (a[b]++) : (a[b] = 1), a),{})
看结果:
标签:...,代码,reduce,一行,次数,字符串 From: https://www.cnblogs.com/zaijin-yang/p/17187014.html