js数组的处理使用
var users = [ {name: "张含韵", "email": "zhang@email.com"}, {name: "江一燕", "email": "jiang@email.com"}, {name: "李小璐", "email": "li@email.com"} ]; var newArr = users.filter(val=>{ return val.name == '江一燕'; }) var newEE = users.map(item => { return item.email }) console.log(newArr[0].email) console.log(newEE.join(',')) var arr = [1,87,54,2,5,5,4,1,1]; var newR = Array.from(new Set(arr)); console.log(newR);
一辈子很短,努力的做好两件事就好;第一件事是热爱生活,好好的去爱身边的人;第二件事是努力学习,在工作中取得不一样的成绩,实现自己的价值,而不是仅仅为了赚钱;