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!
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
Arya PatelFront End Web Development Techdegree Student 6,839 Points
Linking files to html and java script
Jonathan GrieveTreehouse Moderator 91,250 Points
Yes we can.
This is usually done in the footer of a page before the closing body tag. Like this...
In this example, there are 2 linking script files. I've used 2 app.js files as an example but you would have the main script file as the last one. Be aware that the files are read one by one by the browser so 2 functions of the same name in different files are overridden by the other.