Another common scenario is when a function returns another function, as follows:
const bmi = (weight, height) => weight / (height * height);
const calculator = () => {
return bmi;
};
Another common scenario is when a function returns another function, as follows:
const bmi = (weight, height) => weight / (height * height);
const calculator = () => {
return bmi;
};