Как вы вызываете функцию?При использовании деструктурирования вам необходимо передать объект.
computeBMI({ weight: 120, height: 1.6, country: 'Sierra Leone' });
const computeBMI = ({weight,height,country}) =>{
const countries = ['Chad', 'Sierra Leone', 'Mali', 'Gambia', 'Uganda', 'Ghana', 'Senegal', 'Somalia', 'Ivory Coast', 'Israel'];
const nuser = {
weight: weight,
height:height,
country: country
};
let meter= height*0.3048;
for(let c in countries){
if(countries[c] === country) return (weight/(meter**2))*0.82;
}
return (weight/(meter**2));
}
const bmi = computeBMI({ weight: 120, height: 1.6, country: 'Sierra Leone' });
console.log(bmi);