Skip to content

Commit

Permalink
Update code
Browse files Browse the repository at this point in the history
  • Loading branch information
ikanurfitriani committed Nov 20, 2022
1 parent 0e58b3c commit ec40cd6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 0 additions & 6 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,10 @@ btn.addEventListener("click", function () {
return;
}

// BMI = weight in KG / (height in m * height in m)

height = height / 100;

let BMI = weight / (height * height);

BMI = BMI.toFixed(2);

document.querySelector("#result").innerHTML = BMI;

let status = "";

if (BMI < 18.5) {
Expand Down
4 changes: 2 additions & 2 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ h1 {
button#calculate {
font-family: "Nunito", sans-serif;
color: #fff;
background: #4f7df9;
background: #0044ff;
font-size: 16px;
border-radius: 12px;
padding: 12px 0;
Expand All @@ -80,7 +80,7 @@ button#calculate {
transition: background 0.2s ease;
}
button#calculate:hover {
background: #0044ff;
background: #4f7df9;
}
.result {
padding: 30px 20px;
Expand Down

1 comment on commit ec40cd6

@vercel
Copy link

@vercel vercel bot commented on ec40cd6 Nov 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.