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 trialFrederik Dobbener
2,356 PointsWhat did i do wrong?
Can't quite figure out what i did wrong? Thanks for any help in advance
function max(numOne, numTwo){
if (numOne > numeTwo) {
return `${numOne}`;
}
else {
return `${numTwo}`;
}
}
2 Answers
Cameron Childres
11,820 PointsHi Frederik,
Your very close, I just see two main issues.
First of all check the spelling on your variables -- the second line contains "numeTwo" instead of "numTwo".
Second, they want you to return a number and not a string. You've used backticks and string interpolation on your variables which will make them in to strings.
If you fix the spelling and remove `${}` from your return statements (leaving just the variable name) you should be good to go.
Hope this helps! Let me know if you have any questions.
Frederik Dobbener
2,356 PointsThank you :-)