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.

JavaScript Treehouse Club - MASH MASH - JavaScript Stuff You Can Change

Huub Langedijk
Huub Langedijk
5,039 Points

How come nothing happens at all when I press the Tell my fortune button? How do I reset the code?

In the video whenever the button is pressed on the site, a box appears where it says undefined for the variables. Whenever I press Tell my fortune however it looks like it only refreshes my page. As far as I can tell I only made changes to the CSS part.

Can i somehow reset my code or get the version the teacher is using? Everytime I launch the workspace it opens my altered version.

2 Answers

Josian Acevedo
Josian Acevedo
3,662 Points

In the index.html, make sure at the bottom of the code you have the following line:

<script src="script.js"></script>

I think you are missing "script.js"

Josian you are a lifesaver. I had the same problem and was reading through everyone's code and was about ready to start over.

Chris Davis
Chris Davis
16,279 Points

I think you have to go into workspaces in the upper right hand corner of the screen, next to your profile count/avatar, find that workspace and delete it. Then go back into the lesson and when you open that workspace it should be reset.

I have the same problem but I do not want to delete the entire project I have been working on. Do you know another way to get the JS to work without deleting the workspace file?