04 2022 档案

摘要:// for循环嵌套去重 const forRemoveDuplicates = arr => { for(let i = 0;arr.length;i++){ for(let j = i+1;arr.length;j++){ if(arr[i] arr[j]) { arr.splice(j,1) 阅读全文
posted @ 2022-04-18 18:56 木木的奇奇 阅读(20) 评论(0) 推荐(0) 编辑
摘要:const str = 'afduoisdkoanfadsaioewqnosaijufdsa' const o = {} // 获取每个字符出现了多少次 for(let i = 0;i<str.length;i++){ // 获取每一个字符 const chars = str.charAt(i) / 阅读全文
posted @ 2022-04-07 20:55 木木的奇奇 阅读(98) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示