Skip to content

bmi #19

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

bmi #19

wants to merge 1 commit into from

Conversation

JasonYang0520
Copy link

No description provided.

var bmi=getBMI(weight,height);
console.log("bmi:"+bmi);
if(bmi<18.5){
console.log("過輕")
Copy link

Choose a reason for hiding this comment

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

這樣是直接輸出,沒有做回傳的動作
作業題目是要函數回傳,所以先用return
再到函式外面log結果

}
}

getMessage(60,184);
Copy link

Choose a reason for hiding this comment

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

在這邊console.log(getMessage(60,184));

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