## Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

### Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today. # creating a function with two arguments

i don't understand what am doing wrong here but it is not calling the function max back and i tried calling it...

script.js
```function max(firstNumber, secondNumber){
firstNumber = 12;
secondNumber = 5;
if (firstNumber > secondNumber){
return firstNumber;
}else if{
firstNumber === secondNumber;
} else{
return secondNumber;
}
}
``` I think you delete the second third line. Don't use else if() statement. The first if() good, think about it, if the first statement is not true then a solution remains.

```if (firstNumber > secondNumber){
return firstNumber;
} else{
return secondNumber;
}
```

or use shorthand

```if (firstNumber > secondNumber){
return firstNumber;
}
return secondNumber;
```

Call the max() function outside of the max() function. Enter two parameters (two numbers), like this,

```max(firstNumber, secondNumber);
```

Hope this help! What kind of variable? No need to variable. Just call the max() function and give it two parameters, (two numbers), like this,

```function max(firstNumber, secondNumber){
if (firstNumber > secondNumber){
return firstNumber;
} else {
return secondNumber;
}
}
max(5, 9);
```

What happened now?