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 JavaScript Basics (Retired) Storing and Tracking Information with Variables Introducing Variables

Jasveer Singh Aulakh
seal-mask
.a{fill-rule:evenodd;}techdegree
Jasveer Singh Aulakh
Full Stack JavaScript Techdegree Student 1,712 Points

I changed the JavaScript code on workspace but it only shows the previous output, how do I solve it?

I tried everything by saving the file again and again and refreshing it..did not work. showing the same previous code "welcome to treehouse"

same thing has been happening to me in the last few lessons. Updating the code in the .js file, saving, preview shows previous code. Even changed the h1 to a bunch of lorum ipsum, saved it and it didn't change during the preview. It's very discouraging not to be able to follow along.

http://imgur.com/S40n1SJ

6 Answers

Ohad Lev-Aretz
Ohad Lev-Aretz
3,190 Points

If you are using Chrome, trying working with incognito mode. You can also try to delete your cookies and preview again. sometimes even though you made the change in workspace chrome has a cookie of your previous work. so even though you saved and hit preview, you are seeing your old code.

Jasveer Singh Aulakh
seal-mask
.a{fill-rule:evenodd;}techdegree
Jasveer Singh Aulakh
Full Stack JavaScript Techdegree Student 1,712 Points

I am totally disappointed with treehouse because of this workspace problem. How someone can learn and proceed if stuck at workspace everytime?

Piyush Patel
Piyush Patel
17,253 Points

Jasveer Singh, What's your problem. I think it is due to internet. but believe me! Workspace is not so bad, at least you will not be stuck with downloading and installing and moving around various applications.

Take a snapshot of the workspace and share the link here so we can check the code

Your code is good , maybe some kind of error with the workspace, Have you tried delete it and create a new one?

Jesus Mendoza
Jesus Mendoza
23,289 Points

Did you save the workspace before trying the new code?

Lars Hellestrae
Lars Hellestrae
988 Points

It is a little bit frustrating when you follow along and write the exact same code as in the video - and when you preview it you get different results.

Here is my code:

var message = "Hello"; alert(message); messsage = "welcome to javascript"; alert(message);

When I open it in chrome it shows two "alert boxes" both saying "Hello". I thought the second one was supposed to say "welcome to javacript"?

I had to quit a previous course because I got to frustrated with workspace not doing what it was suppose to - hope there is a solution for this.

Ammar JS
Ammar JS
2,454 Points

Clear the cache too... a shortcut to do this in mac is to [ press command + shift + delete ] and delete the cache...