Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

General Discussion

James Summers
James Summers
691 Points

preview 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

Hi James, Can you share your code so we can have a look?

James Summers
James Summers
691 Points

I don't think my code is the problem because it happens even on strings like this:

alert("Why is the preview button not working?");

What you have looks fine! Was everything working before your code? What section in Javascript Basic are you working on?

James Summers
James Summers
691 Points

My preivew button has never worked and I am currently working on the JavaScript numbers course. I have completed the JAvaScript Basics course.