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 trialRonnel Jones
5,043 PointsWhat's my Syntax Error?
I have looked at different resolutions and they say they did such and such and it worked. I tried it all and still come up with a Syntax Error. Please help!!!! Code is:
function max(10,25) { if(25 > 10) { return 25; } else { return 10; } }
max(10,25);
function max (10,25) {
if(25 > 10) {
return 25;
} else {
return 10;
}
}
max(10,25);
1 Answer
Steven Parker
231,236 PointsWhen you define a function you use parameter names to represent the values that will be supplied later when the function is called. You would not use actual values (such as literal numbers) in the definition.
Ronnel Jones
5,043 PointsRonnel Jones
5,043 PointsThanks. I knew it was something stupid I was doing.