js提取对象数组中的某一个属性
arrOld = [ {name: "zhangsan", age: "18"}, {name: "lisi", age: "20"}, {name: "wangwu", age: "17"}, {name: "zhaoliu", age: "19"} ]
arrOld.forEach(item => {
console.log(item.name);
console.log(item.age);
})
原创文章,转载请说明出处,谢谢合作