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 JavaScript Foundations Functions Arguments

Simona Diarrova
Simona Diarrova
5,654 Points

How to create JavaScript page?

How to create functions.js please?

Thanks :)

4 Answers

Could you be more specific?

Are you not sure how to create a new text file that is named "functions.js"?

Simona Diarrova
Simona Diarrova
5,654 Points

Yes. That's it. I created html page in Sublime2 but don't know how and where to create JavaScript page "functions.js" to work with my html page.

George Devidze
George Devidze
3,056 Points

create file "/js/functions.js" then in HTML head tags write: <script src="js/functions.js"></script>

In the video, Jim has put the js file in the same folder as the html file. You can see this at about the 1:20 mark in the video.

So you would want to open a new file just like you did when creating the html file but name it "functions.js" instead and save it in the same folder as your index.html