JS之数组去重
2021-07-16 01:06
阅读:436
标签:indexof 数组 length div for let == new people JS之数组去重 标签:indexof 数组 length div for let == new people 原文地址:https://www.cnblogs.com/xuxml/p/9535285.html
var arr = []
var peoples = [
{id:1,name:‘wang‘},
{id:2,name:‘zhang‘},
{id:2,name:‘zhang‘},
]
for(let val of peoples){
arr.push(val.id)
}
var newArr = [];
var newArr2 = [];
for(var i =0;i
下一篇:初识Spring Boot
评论
亲,登录后才可以留言!