PrashamTrivedi / code-20210605-PrashamHTrivedi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BMI Calculator script

This script reads BMI Data from BMIData.json file, calculates BMI, and also outputs weight and risk profile.

Data format

The file should have specific format of data. This script requires data in format of JSON array with properties mentioned as below.

{Gender:string;HeightCm:number;WeightKg:number}[]

Output

The script adds BMI, BMICategory (weight) and BMIHealthRisk data on input. The output will be written into BMIOutput.json file in below format.

{Gender:string;HeightCm:number;WeightKg:number;BMI:number;BMICategory:string;BMIHealthRisk:string;}

Running test

Please run npm run test script to run tests.

About


Languages

Language:JavaScript 100.0%