level 12
const aTest = [1, 2, 2, 3, 4, 4, 5, 5, 5, 6];
const aNoRepeat = aTest.filter((e, i, a) => a.indexOf(e) === i);
console.log(aNoRepeat);
2021年02月19日 00点02分
2
level 4
var a = [1,2,5,7,2,1];
a = a.reduce((arr,e)=>~arr.indexOf(e) ? arr : [...arr,e],[]);
console.log(a);
2021年02月19日 01点02分
4
level 1
经典调包侠
只会调现成库函数吗,你把库函数展开看看多少行,而且判断代码优劣不是看时间复杂度而是看行数也是奇才
2021年02月22日 17点02分
8
一个数组去重你就不用在这长篇大论展现你的优越了
![[汗]](/static/emoticons/u6c57.png)
api的活用也是用,你从底层实现时间复杂度一定就低了?
2021年02月23日 04点02分
看你就是网上杠精当习惯了 看到就要杠一下?
2021年02月23日 04点02分