Body mass index (BMI)

Category BMI
Underweight <18.5
Normal weight 18.5–24.9
Overweight 25–29.9
Obesity BMI of 30 or greater

ecma/basic/bmi/code/bmi-if.js:

// BMI = weight/height²

const weight = 60;
const height = 1.65;
let result;

// TODO if

// Output:
//  BMI: 22.03856749311295
//  Result: Normal weight

ecma/basic/bmi/code/bmi-switch.js:

// BMI = weight/height²

const weight = 60;
const height = 1.65;
let result;

// TODO switch

// Output:
//  BMI: 22.03856749311295
//  Result: Normal weight

Response: bmi-if, bmi-switch