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 trialVlad Popa
1,995 PointsI cant add JavaScript to HTML
https://w.trhou.se/ykticpb8xk I have followed the courses step by step. It's just not working.
2 Answers
Christian Fynbo
Full Stack JavaScript Techdegree Student 2,910 PointsThe index.html and script.js files are in the same root folder in the provided workspace. This differs from what is shown in the video but there's a quick fix:
Replace <script src="js/script.js"></script> in your code with <script src="script.js"></script>.
Similarly, add <script src="preview.js"></script> on the next line to link your second JavaScript file to the same HTML file.
Piotr Manczak
Front End Web Development Techdegree Graduate 29,363 PointsYou did not attach preview.js to html. I would personally attached js files at the end of the html file just before </body>.