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
Adam Zuckerberg
22,248 PointsConsole Log
I never get back an "undefined" just: "Uncaught SyntaxError: Unexpected token =" from the console log. Why? I am following along with the video, downloaded chrome javascript console, and only the SyntaxError error is coming up? I don't know what is wrong or how to test for "undefined"
3 Answers
Casey Clayton
16,708 PointsThe correct way to use this method is like so:
console.log();
This error is because somewhere you have an = sign in the line that is not needed so it's causing javascript to throw the unexpected token error.
Adam Zuckerberg
22,248 PointsNot helpful. Nothing is 'printed' to the console log. Do you need to set up settings somehow?
Casey Clayton
16,708 PointsYes nothing is suppose to be printed. If you want to print something you put it in between the parentheses like this
console.log("A string that will be printed to the console!!");