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 trialMatt Arnold
2,668 PointsCreate a .js file in Google Chrome
So the "Writing Your Program" video shows the instructor creating a .js file in Google Chrome, but I CAN NOT figure out where he went to do that. It doesn't help that he's using a Mac and I'm on a PC... I've Googled this to death and still can't figure it out. Help!
6 Answers
Erik Nemesis
13,356 PointsNotepad is good but Sublime text is even better.
jesdavpet
21,489 PointsActually, he edited and saved both the example "index.html" and "myScript.js" files in a program called Textmate on Mac (see 0:45-1:15 in the lesson video).
The console/repo at the bottom of the screen in Chrome is mostly used for debugging, testing, etc., and I think whatever javascript you input there is only transient.
Since you're on a Windows machine, you could try something like gEdit (https://projects.gnome.org/gedit/) instead of Textmate. I use gEdit because its free, open-source, fully featured, customizable, and is platform agnostic with versions for Windows, OSX, and Linux -- which is really nice if you wind up jumping from one to another occasionally...
Happy coding!
James Barnett
39,199 Pointsnotepad++ is great text editor on Windows, it's free and an extremely popular choice.
Matt Arnold
2,668 PointsThanks to both! Those both look great, but I'm gonna go with Notepad++ for now. It just feels more intuitive for me.
Also, I'm still unsure of where exactly I need to save these files so that they will load into the webpage. I'm starting this with zero prior knowledge so sorry if these are dumb questions.
James Barnett
39,199 PointsCreate a folder on your desktop and save your HTML & JS files there.
Bruce Mackay
270 PointsWill the Crimson editor work
James Barnett
39,199 PointsYep that will work great
Bruce Mackay
270 PointsI tried and got the site to show using the video http://teamtreehouse.com/library/javascript-foundations/variables/basics I can not get it to show the message it says I should. which tells me it is not getting connected to the myscript.js file it shows on the desktop with it but it shows a error 'console' is undefined. I am not sure what to correct or why it may be supposed to say this but i do not get the desired results anyway. If there is a error I do not know where to find it either.I could do a screen capture and show my work but do not know where to load it to this site
Bruce Mackay
270 PointsI think I need to find the video on working in a browser? I seem to remember it has something to do with how I save the file on the desk top as well as what I name it . I know in my browser I have to name it htm and not html for some reason .
kiran bedi
3,140 PointsFor anyone still having issues figuring this one - here's what I did. use notepad++ or sublime text or any other editor to create index.html and myscript.js file. Create a folder on desktop and add both files to it. Launch index.html with chrome and then open the dev tool window. Click on the 'console' tab and now refresh your screen. The console will display the js message. Hope this helps.
Luke Ojukwu
76 PointsLuke Ojukwu
76 PointsI had been racking my brain out for hours on this too!!!!!