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 trialSimona Diarrova
5,654 PointsHow to create JavaScript page?
How to create functions.js please?
Thanks :)
4 Answers
Jason Anello
Courses Plus Student 94,610 PointsCould you be more specific?
Are you not sure how to create a new text file that is named "functions.js"?
Simona Diarrova
5,654 PointsYes. 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
3,056 Pointscreate file "/js/functions.js" then in HTML head tags write: <script src="js/functions.js"></script>
Jason Anello
Courses Plus Student 94,610 PointsIn 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