Design a BMI Calculator using JavaScript

The Body Mass Index (BMI) Calculator can be used to calculate BMI values based on their height and weight. BMI is a fairly reliable indicator of body fatness for most people.

Formula:

BMI = (weight) / (height * height)

Here’s JavaScript code

fun…


This content originally appeared on DEV Community and was authored by Ahtsham Ajus

The Body Mass Index (BMI) Calculator can be used to calculate BMI values based on their height and weight. BMI is a fairly reliable indicator of body fatness for most people.

Formula:

BMI = (weight) / (height * height)

Here's JavaScript code

 function BMI(weight, height) {
     return(weight / (height * height));
 }

 let bmiResult = BMI(57, 173.736);
 console.log(bmiResult);

Alt Text


This content originally appeared on DEV Community and was authored by Ahtsham Ajus


Print Share Comment Cite Upload Translate Updates
APA

Ahtsham Ajus | Sciencx (2021-06-23T05:45:51+00:00) Design a BMI Calculator using JavaScript. Retrieved from https://www.scien.cx/2021/06/23/design-a-bmi-calculator-using-javascript/

MLA
" » Design a BMI Calculator using JavaScript." Ahtsham Ajus | Sciencx - Wednesday June 23, 2021, https://www.scien.cx/2021/06/23/design-a-bmi-calculator-using-javascript/
HARVARD
Ahtsham Ajus | Sciencx Wednesday June 23, 2021 » Design a BMI Calculator using JavaScript., viewed ,<https://www.scien.cx/2021/06/23/design-a-bmi-calculator-using-javascript/>
VANCOUVER
Ahtsham Ajus | Sciencx - » Design a BMI Calculator using JavaScript. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/06/23/design-a-bmi-calculator-using-javascript/
CHICAGO
" » Design a BMI Calculator using JavaScript." Ahtsham Ajus | Sciencx - Accessed . https://www.scien.cx/2021/06/23/design-a-bmi-calculator-using-javascript/
IEEE
" » Design a BMI Calculator using JavaScript." Ahtsham Ajus | Sciencx [Online]. Available: https://www.scien.cx/2021/06/23/design-a-bmi-calculator-using-javascript/. [Accessed: ]
rf:citation
» Design a BMI Calculator using JavaScript | Ahtsham Ajus | Sciencx | https://www.scien.cx/2021/06/23/design-a-bmi-calculator-using-javascript/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.