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

General Discussion

Intro to programming > Basics > Writing Your Program

The lesson I am watching is: Programming > Intro to programming > Basics > Writing Your Program. He mentions that he has an html page loaded into chrome and somehow he creates a javascript file but doesn't really guide us on how to. Can someone explain how he creates the java script file? And can we apply this to any html page?

Is there another lesson that covers this?

Here is the link to the video: http://teamtreehouse.com/library/programming/introduction-to-programming/basics/writing-your-program

6 Answers

Help

Hey Michael Cenobio Welcome to the Treehouse forums.

That course is designed to be taken after the HTML Foundations & CSS Foundation courses. You might want to check out the Become a Web Developer learning adventure, to see the order in which the courses were designed to be taken in.


As a side note, I think you just won the award for least informative post title on the forum :wink:.

Check out this featured post on how to ask good questions on the forum

The quickest way is to open up a text editor and save the file as a .js extension. For example; if your using Windows you can use notepad. However, There are better tools out there that can provide a better code writing experience.

Ryan Marfone - Don't forget that the javascript file needs to be referenced in an HTML file and that HTML file has to have valid syntax.

Good point. I'd also like to add that http://jsfiddle.net/ is a good cloud-based experience for testing javascript.

Ryan Marfone - Personally I prefer jsbin for learning JavaScript, as you can output data to the console, unlike with jsfiddle.

Outputing data to the console is very helpful when learning JavaScript.