Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialLuis Paulino
Courses Plus Student 1,779 PointsWhat do I do know?
I need help finishing this exercise. It says that I have to display it out side the function, and it just doesn't work. Let me know if you need more information.
function max(five,eight){
return eight;
}
1 Answer
Brent Suggs
Front End Web Development Techdegree Graduate 21,343 PointsWell the function you have written isn't complete yet. The challenge wants you to create a function that will take two parameters (numbers), determine which parameter is larger and then return the value of that parameter. Remember that when you declare the function that the parameter names are just placeholders for the actual values that you will provide the function when called upon.
for example:
// function declaration
function greaterThan(placeholder) {
if (placeholder > 2) {
return placeholder;
}
}
// function call
greaterThan(5);