javascript
Published on January 26, 2024By DeveloperBreeze
function calculateBMI(weight, height) {
const heightInMeters = height / 100;
return weight / (heightInMeters ** 2);
}
const weight = 70;
const height = 175;
const bmi = calculateBMI(weight, height);
console.log('BMI:', bmi);
Comments
Please log in to leave a comment.