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 trialAlonzo Delk
6,991 PointsOk I'm not sure how this function argument should be. Please give me some help?
function max (mob22, mob215) {
if (mob22 > mob15) {
return mob22;
} else {
return mob15;
}
}
console.log( max(22, 15) );
3 Answers
Ian Cahn
7,245 PointsHey man, you got very close, you just mistyped your parameters in line 2, you have parameter mob215, but you call mob15
:)
function max (numberOne, numberTwo) { if (numberOne > numberTwo) { return numberOne; } else { return numberTwo; } };
Alonzo Delk
6,991 PointsThank you Ian, and its funny how your eyes can play tricks on you. I'll make sure to read over my code slowly to catch details.
Mark Sebeck
Treehouse Moderator 37,799 PointsAlonzo, sometimes its good to step away from the code for a little while and when you come back sometimes the little typos jump right out at you. Keep working at it!
Alonzo Delk
6,991 PointsAppreciate that advice Mark. I'm going to keep working at it!