Skip to content

Feat: Add fully functional JavaScript logic and dynamic summary for BMI Calculator#40

Open
myweb768 wants to merge 2 commits into
Grow-with-Open-Source:mainfrom
myweb768:BMI_Calculator
Open

Feat: Add fully functional JavaScript logic and dynamic summary for BMI Calculator#40
myweb768 wants to merge 2 commits into
Grow-with-Open-Source:mainfrom
myweb768:BMI_Calculator

Conversation

@myweb768

Copy link
Copy Markdown

🚀 Overview
Hi there! I have successfully completed the core functionality and logic for the BMI Calculator project. The application now properly calculates the Body Mass Index (BMI) based on user inputs and dynamically displays the appropriate health status and detailed recommendations.
🛠️ Changes Made

  1. Core Logic Implementation: Calculated BMI using the formula: $BMI = \frac{weight}{(height \times height)}$ and limited the result to 2 decimal places using .toFixed(2).
  2. Dynamic Content Display: Handled conditional rendering (if/else if) based on standard BMI ranges ($<18.5$, $18.5-24.9$, $25-29.9$, and $\ge 30$).
  3. DOM Manipulation: Toggled Tailwind CSS utility classes (hidden / block) to reveal the corresponding health status (.your_BMI) and health advice summaries (.BMI_Summery).
  4. UI Reset and Flow Control: Implemented a resetting mechanism to clear previous results upon recalculation and hidden the input section to focus entirely on the output data.
  5. Bug Fixes: Resolved edge-case issues regarding standard boundary numbers (e.g., handling exact values like $30.0$).

📷 Output Verification
The code has been thoroughly tested locally in the browser, and all DOM selectors mapping correctly with the index.html file.Please review my changes and let me know if any further adjustments are required.
Thank you!

@github-actions github-actions Bot requested a review from iamwatchdogs May 26, 2026 04:30
@github-actions

Copy link
Copy Markdown

👋 @myweb768
Thank you for raising your pull request.
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants