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 Introduction to Programming Basics Writing Your Program

i didn't understand

Am confused about how to write your program. Didn't understand all the steps please help.

4 Answers

Hi Owomugisha Birungi --

Your program consists of the JavaScript that you've written and want to include in your html. To create it, you open your text editor and write in any JavaScript that you'd like, then save it with a JavaScript extension. That would look something like myscript.js.

Then you have to include that new program in your html. To do that you link to that new JavaScript file in a similar way that you'd link a CSS file, by placing the link - which would look something like this: <script src="myscript.js"></script> - in the head of the html document.

Hope that helps!

Rachel Addleman
Rachel Addleman
10,162 Points

Do you have a specific question on one of the steps? It's hard to help when your question is so vague.

How to create a program and also writing codes into a file.

thanks