题解 | #数组去重#
数组去重
http://www.nowcoder.com/practice/0b5ae9c4a8c546f79e2547c0179bfdc2
Array.prototype.uniq = function () {
let arr = this
let newArr = []
arr.forEach(item => !newArr.includes(item) && newArr.push(item))
return newArr }