HACKER
TALK
Home
Channels
beta
Bookmarks
Messages
Notifications
Sign In
Comment
js数组去重,常用
javascript // 数组去重 removeDuplicats(arr, type) { if (arr.length == 0) { return arr
koaxios
·
4 years ago
nice!还可以直接用es6的set和扩展运算符:
[
...
new
Set
(
数组名
)
]
1
Reply
Report
Replies
2
leyioliu
·
4 years ago
优秀
Reply
Report
misix
·
3 years ago
这种写起来最爽
Reply
Report
koaxios
Joined 4 years ago
Follow
Message