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 trialJuliette Tworsey
Front End Web Development Techdegree Graduate 32,425 Pointsmodule.exports.get = get;
Hi,
The console in Workspaces is returning the wrong information when I attempt to call get in app.js via the console.
I have no idea as to what could be wrong.
Thanks in advance to anyone who can spot what is missing from my code:-)
2 Answers
Kevin Korte
28,149 PointsWhen I run it, the console says SyntaxError: Unexpected token {
on line 30 of profile.js.
You forgot something. Can you spot it?
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,425 PointsOoooh! LOL.... I needed a colon after message. That's fatigue setting in:-)
Thanks for the tips!
Kevin Korte
28,149 PointsYou got it! We all have these problems, lol. Have fun with it. I just went through these lessons myself a few days ago.
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,425 PointsJuliette Tworsey
Front End Web Development Techdegree Graduate 32,425 PointsAh, thanks Kevin. I was missing a ")" after the status 200.....Still though, the console will not return the proper info.
Hmmm....
Kevin Korte
28,149 PointsKevin Korte
28,149 PointsYep, that was it, and yes on to the next error. I'm going to only help lead you to debug this yourself, using the same logic you will develop to solve these issues yourself.
So, onto the next error. What does it say? I see
printError({message" "There was an error getting the profile for " + user SyntaxError: Unexpected string
If you look at the console, it's actually pointing to where the error is at. Unexpected string also tells us we probably messed up with our quote marks. Do you see the syntax error? It's in the console and where I copied the text over.