nom: "Dupont",
sex : "f",
},
{
nom: "Brusel",
sex : "h",
},
{
nom: "Dupont",
sex : "f",
},
];
function civiliteF(person) {
return (` Cher(e) ${person.nom}`);}
function transf(array, fx) {
let passed = [];
for(let v of array)
passed.push(fx(v));
return passed;
}
let tabT = transf(tabPers,civiliteF);