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 The Solution

I attached the javascript file the same way as the video but the browser console says it doesnt recognize "practice.js"

Here is the code I used to attach the file and I put it in the body section of the document but it still doesn't work:

<script src="prac.js"></script>

2 Answers

Steven Parker
Steven Parker
231,269 Points

I'm not sure why the browser would be looking for "practice.js", since the code shown here is trying to load "prac.js".

The name itself is not important, but it must be the same in the code as it is on the file.

The source reference in the src attribute within your script tags must match the file name exactly.

Replace

<script src="prac.js"></script>

with the following:

<script src="practice.js"></script>