let min = words.reduce(function(acc, x) {
acc = Math.min(acc,x);
return acc
},Number.MAX_VALUE);
🥷la valeur initiale est une valeur !
console.log(min);
ou let min = words.reduce( (acc, x) => Math.min(acc,x),Number.MAX_VALUE);
code
console.log(min);
ou let min = words.reduce( (acc, x) => Math.min(acc,x),Number.MAX_VALUE);
code