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 trial
Alejandro Rodriguez
1,383 PointsWhats wrong with this code ? It keeps saying parse error
var num1 = parseInt('5');
var num2 = parseInt('3');
function max(num1, num2) {
if (num1 > num2) {
return num1;
} else {
return num2;
}
2 Answers
Rich Donnellan
Treehouse Moderator 27,741 PointsHey Alejandro,
Make sure your curly braces ({}) are all matched up; the function is missing the closing one. This can be really hard to spot if your formatting is off or you've been staring at it for a bit!
Hope this helps.
Julian Gutierrez
19,325 PointsLooks like you are missing the closing bracket to your function.
Alejandro Rodriguez
1,383 PointsAlejandro Rodriguez
1,383 Pointsyeah i was staring at it for a really long time, thank you !!