NatChen

Once you have chosen the road of life, you have to be brave enough to go to the end and never look back.

摘要: 方法一: 双层循环,外层循环元素,内层循环时比较值 如果有相同的值则跳过,不相同则push进数组 Array.prototype.distinct = function(){ var arr = this,result = [], i,j,len = arr.length; for(i = 0; i 阅读全文
posted @ 2018-10-19 20:49 NatChen 阅读(726) 评论(0) 推荐(0)