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 trialReid Larson
12,711 Pointswhy is everything coming up as undefined?
I usually write all the code along with the videos to have it stick in my mind. When I started getting errors i looked through all my code and it was fine. Then i even copied from workspace to sublime and still the same thing. First I get an Uncaught SyntaxError: Unexpected token '{' on my add task function which doesn't make sense. Then i try looking at taskInput and i'm getting Uncaught ReferenceError: taskInput is not defined
this is driving me crazy.
2 Answers
Raymond Wach
7,961 PointsAs David Clausen said in his comment, it's difficult to debug without seeing the code. My guess would be that you are missing something like a semicolon or a closing brace or parenthesis above the line with the SyntaxError
. Typically, errors along the lines of "Unexpected token" really indicate an error in the code before that point, but the parser isn't smart enough to backtrack and figure out what could be missing so it just reports the thing it wasn't expecting to see.
Reid Larson
12,711 PointsI was actually able to figure it out! Thanks!
David Clausen
11,403 PointsDavid Clausen
11,403 PointsPasting your code will be the first step in helping as we have no clue without the code that is messing up.
paste it in between:
```Javascript
//Paste Code between here
```
Thanks