-
Notifications
You must be signed in to change notification settings - Fork 0
First challenge #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
bbfc7a7 to
aefc324
Compare
|
Hello @Jess2896 |
Added a verification process, let me know if its fine like this. |
oscarpolanco
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add a few spaces on some of the lines in the code. Here a useful js guideline for js.
ad3edc8 to
022cd34
Compare
script.js
Outdated
| let isMarkHigherBMI = calculateBMI(markMass, markHeight) > calculateBMI(johnMass, johnHeight); | ||
|
|
||
| function calculateBMI(mass, height) { | ||
| return mass / (height * height); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On this line, you can add heigth^2 and is the same. What you think; can we update this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what i gather ^ is the XOR bitwise operator and it gives a different result.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should put it in words my bad 😅
There is an operator that is for the square. I put the mathematical notation. On js the operator is different
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see what you mean. Fixed it.
oscarpolanco
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!! Just a minor comment for fun
script.js
Outdated
| let isMarkHigherBMI = calculateBMI(markMass, markHeight) > calculateBMI(johnMass, johnHeight); | ||
|
|
||
| function calculateBMI(mass, height) { | ||
| return mass / (height * height); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should put it in words my bad 😅
There is an operator that is for the square. I put the mathematical notation. On js the operator is different
022cd34 to
d2c31b6
Compare
index.html
Outdated
| </body> | ||
| </html> | ||
|
|
||
| <script src='script.js'></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
script tags are included inside the body tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
script.js
Outdated
| @@ -0,0 +1,11 @@ | |||
| let markMass = 70; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why using let here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, realized i should have been using const on the second challenge and fixed the declarations in all the PRs except for this one.
Functionality
Verification steps
Download both files(index.html and script.js) into a folder and then open the index.html file on a browser.
Inspect the website and open the console to see the result obtained.