Ask Your Question
1

When attempting to create a JS-based BMI Calculator, why does the computation consistently result in "NaN"?

asked 2021-06-12 11:00:00 +0000

devzero gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-11-15 18:00:00 +0000

lalupa gravatar image

The computation may consistently result in "NaN" if one or both of the inputs for weight and height are not valid numbers, or if the formula for calculating BMI is not correctly implemented. "NaN" stands for "Not a Number" and is returned when a math operation is performed on invalid input.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-06-12 11:00:00 +0000

Seen: 8 times

Last updated: Nov 15 '22