摘要: // ES6 function unique (arr){ const seen = new Map() return arr.filter((a) => !seen.has(a) && seen.set(a, 1)) } //or function unique (arr) { return Ar 阅读全文
posted @ 2017-03-28 10:26 小贺说IT 阅读(194) 评论(0) 推荐(0)