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 trialJames Summers
704 Pointspreview button not working
The preview button does not work. Every time I click it, it takes me to a blue screen like shown in Mr. Guil's Javascript Basic videos but does not run my code. What is wrong? I have not had any practice with script tags because my code won't run in the preview thing and in a normal JavaScript console it just gives me error messages. Please help or I'm afraid I might fail!
I get this error: VM35:22 Uncaught SyntaxError: Invalid or unexpected token
2 Answers
Shem Ogweno
15,393 PointsHi James, Can you share your code so we can have a look?
Shem Ogweno
15,393 PointsWhat you have looks fine! Was everything working before your code? What section in Javascript Basic are you working on?
James Summers
704 PointsMy preivew button has never worked and I am currently working on the JavaScript numbers course. I have completed the JAvaScript Basics course.
James Summers
704 PointsJames Summers
704 PointsI don't think my code is the problem because it happens even on strings like this:
alert("Why is the preview button not working?");