const students = [{
name : 'Asep Ripa',
age : 23,
},
{
name : 'Ahmad Ropi',
age : 16,
},
{
name : 'Latipatulsupi',
age : 18,
},
{
name : 'Azkia Salsa Humaira',
age : 9,
},
{
name : 'Lana Ismail',
age : 22
},
{
name : 'Dadang Hidayatullah',
age : 23
}
];
const yearKTP = students.filter(student => student.age >= 17);
const allowed = yearKTP.forEach((student, idx) => {
console.log(`${idx+1}. Nama : ${student.name} | Age ${student.age}`)
})
/