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 trialJesse Vorvick
6,047 PointsJavaScript Basics Challenge Help
I passed this challenge, but was it meant to be this hard/complex? I feel like I was somehow overdoing it, and the solution was something more obvious that slipped my mind. Am I missing something? Here is my code.
function max ( x, y ) {
if ( x > y ) {
return x;
} else if ( y > x ) {
return y;
} else {
alert('Please enter two numbers that are different.');
}
}
alert ( max ( 2, 4 ) );
Jesse Vorvick
6,047 PointsSorry, fixed.
KRIS NIKOLAISEN
54,971 PointsKRIS NIKOLAISEN
54,971 PointsYour code is missing