摘要: 数组去重不仅在工作中经常使用,也会在面试中经常问到,现在有几种常用的方法: 比如要将数组去重: const arr = [1, 2, 3, "1", 2, undefined, undefined, "undefined", NaN, NaN]; 方法一: 直接通过indexOf 或者 includ 阅读全文
posted @ 2021-05-19 17:20 liumcb 阅读(62) 评论(0) 推荐(0) 编辑