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.
Jerry Wu1,845 Points
In spite of the console.log command in my script.js file, nothing appears in JS console in Chrome. Why?
I have the following line of code written into my script.js file:
However, when I press CTRL + Shift + J to access JS console in my Google Chrome browser, the console box is completely empty--nothing is logged whatsoever. Why is this?
Jennifer NordellTreehouse Teacher
I agree with Kevin Korte. There is also the possibility that your browser cache is loading in an older version of your code as opposed to your newly altered code. Try viewing the same file in a private browsing tab or clearing your browser cache and then refresh the page. If this doesn't work, then we really will need to see your code to be able to assist you further
make sure you saved your work
Kevin Korte28,107 Points
Are you sure you have properly linked your JS file so that the browser will actually execute it? Would need to see more of your code to know that. From my experience, very very rarely can issues be attributed to a "browser glitch", and they are always the simplest of errors on our part
Can you share the whole file? Is it just the one line of code?
Jerry Wu1,845 Points
I added the one line of code to the .js file from this workspace.
Dawson St. Julien1,246 Points
Closing the preview tab in your browser and re-launching preview from workspaces seems to fix the issue. Must be a caching issue.