Welcome to the Treehouse Community
Looking to learn something new?
Challenge Task 1 of 2 for Giving Information to Functions
Good evening, I am trying to create a max() Function with two arguments. The exercise states that I need to create an IF statement to test which number is the larger of the two arguments. I have tried several times to create an IF statement that will allow me to do this with no success. I create a function at the top of the program and then I write my IF statements outside of the function. Do i need an IF ELSE statement and not just an IF statement? Do I need to display an alert message saying which number is (or isn't) the max? I keep getting syntax errors every time I try to run my program.
Seth Kroger56,403 Points
Sharing you code will help a lot. However I will give you the hint that the if statement needs to go inside the function, not outside it.