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 trial

JavaScript JavaScript Functions Pass Information Into Functions Create a max() Function

what

script.js
function max(1, 2) {
   return 
}

1 Answer

Simon Coates
Simon Coates
8,481 Points

As an initial suggestion, you should provide a textual name for your parameters in the function definition. eg.

function max(firstNumber, secondNumber) {
//add if statement and else here.
}

if you get stuck again, you can see the complete code and a quick explanation at https://teamtreehouse.com/community/create-a-function-named-max-that-accepts-two-numbers-as-arguments-name-the-parameters-whatever-you-would-like-the-fun-2