const array=["dupont", "dupond", "dupont", "dupond", "dupont", "dupond", "dupont"];
const separe = function(array){
let i = 0
,j = array.length-1;
while (i < j) {
if (array[i] == "dupond"){
i++
}
else{
let tmp = array[i];
array[i] = array[j];
array[j] = tmp;
j--
}
}
return array
}
console.table(separe(array))
🥷Que vaut array ?