Reviewing properties of functions
•Selecting
names … don’t use alert()
•Parameter variables … don’t need to be declared, but
work like local variables
•
function
bmiE ( weightLBS, heightIn ) {
// Figure BMI in English
var heightFt = heightIn / 12; // Change to
feet
return 4.89 * weightLBS / (heightFt *
heightFt);
}
function bmiE ( weightLBS, height ) {
// Figure BMI in English
(height in in)
height = height / 12; // Change to feet
return 4.89 * weightLBS /
(heightFt * heightFt);
}