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) Making Decisions with Conditional Statements Introducing Conditional Statements

function

Please help me treehouse admins!! I am so eager to continue on my coding journey however i have searched high and low for a solution to this problem but can find none, every code i put into the workspace does not respond when i view it in the browser, ive tried saving file and refreshing browser but still have no success. this is really hurting my confidence because i have found the correct code online and copied and paste it into the workspace and still does not work. Is this my computer ?

Justin Horner
Justin Horner
Treehouse Guest Teacher

Hi William,

Please follow the advice that Moosa has provided and let us know if you're still experiencing this issue afterward. Thanks!

Good afternoon, Moosa, Justin I have tried the suggested method, and it is still not showing in the browser i will upload screenshots of the code as-well as the browser. Again thank you for taking the time to reach out and help me. Thank you, William

please email me, it is not letting me post the screenshot. wclark@sfo.yearup.org thank you, william

1 Answer

Moosa Bonomali
Moosa Bonomali
6,297 Points

Can you post the code which is not working, so it is easier to understand the problem you are having hopefully provide a solution. Do not despair and do not lose hope. Some of us have been where you are. By the way, I am not an admin but a student on treehouse as well.

By the way; Javascript code can be declared in the header section, within the html or in an external file. If your javascript is interacting with HTML DOM elements, it is important that the Javascript begins its execution after the DOM has been loaded by the browser. This has got me in the past, as I would try the execute code based on some DOM element, but the element was not yet loaded by the browser and it would just not work.

The other issue I have seen sometimes is that the browser would cache a javascript file which I had loaded and after making changes and refreshing the browser, the same old code would still run. So If you are using Chrome or Firefox, if you open developer tools, there is an option to disable cache. Another 'gotcha' that used to get me.