bmi-calculator

Screen Shot 2023-10-27 at 11 18 20 AM

Frontend Mentor - Body Mass Index Calculator solution

This is a solution to the Body Mass Index Calculator challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Note: Delete this note and update the table of contents based on what sections you keep.

Overview

Was a little challenging if getting used to JavaScript. BMI was a great warmup. Some css understanding of flexbox and grid. BMI using JS is operable. I chose *imperial instead of both.

The challenge

Users should be able to:

Screenshot

./assets/images/screenshot.png

My process

Built with

What I learned

The JavaScript side of things. First time actually using conditionals:

if (bmi <= 18.4) { document.getElementById(‘message’).innerHTML = ‘You are under weight’ } else if (bmi >= 18.5 && bmi <= 24.9) { document.getElementById(‘message’).innerHTML = ‘You are at a healthy weight’ } else { document.getElementById(‘message’).innerHTML = ‘You are overweight’ }

Continued development

To continue with JS with more challenges

Author