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)
阅读全文
摘要:const str = 'afduoisdkoanfadsaioewqnosaijufdsa' const o = {} // 获取每个字符出现了多少次 for(let i = 0;i<str.length;i++){ // 获取每一个字符 const chars = str.charAt(i) /
阅读全文