let objList = [
{name:"tom",age:12},
{name:"jack",age:33},
{name:"zio",age:12},
{name:"lolo",age:89},
{name:"robin",age:16},
]
let ageList = [12,16];
let getData = objList.filter((item)=>{
return ageList.includes(item.age)
});
console.log(getData)
as shown above, the final printed data is an element with an age of 12 / 16. I would like to ask you bosses, how can the Filter object array get the desired data if you only use the for loop method?