nom: "Dupont",
sex : "f",
},
{
nom: "Brusel",
sex : "h",
},
{
nom: "Dupont",
sex : "f",
},
];
function toUpperName(person) {
person.nom = person.nom.toUpperCase();
return person;
}
function transf(array, fx) {
let passed = [];
for(let v of array)
passed.push(fx(v));
return passed;
}
let T = transf(tabPers,toUpperName);