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

Run JavaScript in browser with own text editor(Sublime Text 3)

Hi, I am over the max amount of workspace and i now need to know how to run the code in the browser. I am using Sublime Text 3. I fgured out how to run the html and css in the browser. However, my problem:

  • I do not know i can make the Javascript parts run too. Only the html is working in the browser. There is no interactivity. I read about needing to setup a local host, but i cannot figure out how to do so. And i cannot find any clear instructions anywhere. So now i am stuck with the tutorials since i cannot move ahead.

I am sure this is not that diffucult to do since a web developer does this all the time.. Is there a simple tutorial for this? Any help is greatly appreciated.

Thanks

2 Answers

Steven Parker
Steven Parker
229,744 Points

Are you sure you need to keep all 100 of those workspaces? Typically, you can delete all the ones that are part of courses you have already completed. Then you will have plenty room for your current course.

Just go directly to the Workspaces page and click the trash can on the right of each one you no longer need. Note that you'll have several pages if you have 100 active ones.

Oh, i did not even realise that! Thanks! I'll be able to keep up the momentum. But still, i need to be able to run it from my own text editor eventually. If you have any links to how to do this or other resources expailing it i would be very greatful.

Steven Parker
Steven Parker
229,744 Points

If your editor allows live HTML preview in your browser, it probably is capable of serving the JS to the browser as well. It's probably just a matter of proper configuration, you might look in the editor's documentation.

Steven Parker
Steven Parker
229,744 Points

Abbas Zaidi — Glad to help. You can mark a question solved by choosing a "best answer".
And happy coding!