题解 | #数组去重#

数组去重

https://www.nowcoder.com/practice/0b5ae9c4a8c546f79e2547c0179bfdc2

{"css":"","js":"Array.prototype.uniq = function () {\n    let res = []\n    for(let i = 0; i < this.length; i++){\n        if(!res.includes(this[i])){\n            res.push(this[i])\n        }\n    }\n    return res\n}","html":"","libs":[]}

全部评论

相关推荐

10-03 17:08
已编辑
西安电子科技大学 Java
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务