Created
November 27, 2017 13:36
-
-
Save seogi1004/98623a6120660bd1e12431cd751a832b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isAdult(age) { | |
if(age > 19) return true; | |
else return false; | |
} | |
function viewMyInfo(name, age) { | |
if(isAdult(age)) { | |
return name + "님은 성인이 맞습니다."; | |
} else { | |
return name + "님은 성인이 아닙니다."; | |
} | |
} | |
alert(isAdult(26)); | |
alert(viewMyInfo("Moon-Hak-I", 26)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment