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 trialHilary Katsande
9,045 Pointscreate a new function called max
create a new function called max which accepts two numbers as arguments ; and whould return the larger
function max (2;4);
if ('4 is greater than 2')
return larger;
1 Answer
Mike Hatch
14,940 PointsYour syntax needs some reworking. It will look more like this:
function max( , ) {
if ( > ) {
}
}
Jennifer Nordell
Treehouse TeacherJennifer Nordell
Treehouse TeacherHi, Mike Hatch! I took the liberty of changing your comment to an answer. Besides keeping the forums tidy by marking the question as "answered", it also allows for voting on your answer and possible selection of "Best Answer". Thanks for helping out in the Community!
Mike Hatch
14,940 PointsMike Hatch
14,940 PointsOkay, thank you Jennifer. Sometimes I do that with uncertainty if I'm giving a full answer or not. I'm still gauging just how much I'm supposed to help. Some students outright give the answer away, and others give more of a guide. Love all the work you do here! A big fan.
Jennifer Nordell
Treehouse TeacherJennifer Nordell
Treehouse TeacherFor what it's worth, I thought that was pretty spot on And thanks! Didn't know I had fans
Michael Hulet
47,913 PointsMichael Hulet
47,913 PointsI know Jen already responded to your comment, but I just wanted to agree with her here. This was a solid response imo. I also wanna add that the only real thing you shouldn't do when responding that isn't an immediate no-brainer is post code that can be copied and pasted into a challenge/quiz and pass unmodified. Your answer here was great, and please help as much as you're inclined to!