摘要: 1.找出每个字符出现的次数 let obj = {}; let arr = ['a','a','a','b','b','c','d','e','f','f']; arr.map(x => obj[x]= obj[x] ? obj[x] + 1 : 1 ); console.log(obj); 2.字 阅读全文
posted @ 2021-12-01 14:49 Robot-Blog 阅读(309) 评论(0) 推荐(0) 编辑