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!

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) Introducing JavaScript Your First JavaScript Program

Workspaces opens into a diffent window and will now allow me to write code to the browser

so whenever i open workspaces, it opens into a separate text box style window and doesn't become a tab in my browser. I'm using chrome and windows. it will now allow me to manipulate code and run it in the browser... even the command "document.write" will not work... "write" is instantly turned red and nothing else comes out correct afterwards. Yes I've gone over it over and over and I'm typing everything as it says and still nothing... please help..

Hello I trying to ask question bar and I guess comment is gonna do it, but I wanted to ask in this part of the course I wrote down these 3 commands from top to bottom 2 of these commands were alerts and the other one is doc.write. The bottom command was an alert "Thank you for visiting on my site" and in the video it showed it did just that, it said 1st welcome to the website then follows the doc.write and the final alert "Thank you...etc." both appeared at the same time. In my case on my workspace however, both alerts showed up first and then finally the doc.write? And I'm just a tad bit confused if there's any specifics on how the coding of Javascript should be have been written in order for the commands to follow each step when I write the code?

1 Answer

Andreas Nyström
Andreas Nyström
8,886 Points


Here's some stuff to make sure you're doing right:

  1. Write in the file called scripts.js (not the index.html or the css files!)
  2. Save the file you're working in (ctrl/cmd+s) or (file>save).
  3. Press the preview button (eye-icon) on your top right corner of the workspace window to open up and preview what you've done.