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

JavaScript

Iman AbuAlia
Iman AbuAlia
416 Points

My code isn't running when I hit preview

I'm writing my code in the workspace and then I hit preview and go to the console, but the console seems to only be connected to strings.js and I can't seem to add another workspace under filesystem to add my current workspace (transform.js).

Basically, whatever code I'm typing in the workspace isn't being reflected in preview in the console. How do I fix this?

Jamie Moore
Jamie Moore
3,997 Points

I know this might sound stupid, so forgive me if so, but have you checked that you're definitely saving before trying to preview any changes?

Sometimes it can help to close all your workspaces and previews, then just launch the workspace you want, then try to preview. You might just be looking at a wrong file/preview.

Hope this helps!

1 Answer

Robert Manolis
STAFF
Robert Manolis
Treehouse Guest Teacher

Hey Iman AbuAlia , doublecheck the script tag in your index.html file and make sure it's linking to the correct file. :thumbsup: