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 trialThomas Grow
3,238 PointsError encountered that I can't figure out...
I'm running the workspace from the challenge. When I run it, I get the following error:
Uncaught SyntaxError: Unexpected end of input
This is in line 1 of the student_report.js:
var message = '';
Why am I getting this? The line ends with a semicolon and everything looks exactly as in the challenge.
2 Answers
Colin Bell
29,679 PointsIs that the only code? Usually Unexpected end of input
means there is a missing )
or }
somewhere.
TJ Egan
14,420 Pointstry just
var message;
Thomas Grow
3,238 PointsNope. Didn't help. Should you be able to initialize anyway?
Thomas Grow
3,238 PointsThomas Grow
3,238 PointsAhhhh... sure enough, I was missing a } at the end of the program. Thanks!
Colin Bell
29,679 PointsColin Bell
29,679 PointsIt's a definitely a frustrating error since it usually shows it as being on line one when the actual source of the error usually isn't.