• Tools
  • Articles
  • Q&A
  • Login
0 0

javascript怎么实现多种数据类型的数组去重?


数组中包含数组,Object,undefined,null,function等等一系列复合类型,请问javascript怎么实现去重。

web前端开发 前端 前端性能 前端开发 JavaScript

11 years, 1 month ago
酷酷的杰瑞

酷酷的杰瑞


share
酷酷的杰瑞 11 years, 1 month ago

Answers

0

看一下underscore的uniq()方法实现

文档:
http://underscorejs.org/#uniq

代码:
https://github.com/jashkenas/underscore/blob/master/underscore.js#L521

answered 11 years, 1 month ago
酷酷的杰瑞

阿婆主合体吗


share
阿婆主合体吗 answered 11 years, 1 month ago

Your Answer

Ask Question
Related questions

requirejs 引入公共代码问题?

jQuery 如何获取嵌套较深的相同节点

关于第一个参数对Object.create()结果造成的不同的一个小疑惑

window.location.href跳转页面详细过程是怎么样的?

如果写出漂亮的javascript程序?

前端开发scroll事件