includes方法可以感知 undefined、null、NaN,对于对象检查的是地址,所以不同对象不会导致includes为true Array.prototype.uniq = function () { let temp = [] this.forEach(e => { if (!temp.includes(e)) temp.push(e) }) return temp }