So simple, but it's not working

So this is so simple and it was working before. I’m trying to load a JS file into my html. I think I have the file extension correct, but it’s not loading the JS on my page. This is for a JS video I’m following on YouTube.

42 PM

the file:// only works for local file systems, i.e. on your own computer.

If this is hosted on the Internet (codepen, your own website, etc), either use relative paths src="/directory/file.js"
or the complete url src=“http://www.googlecdn.com/folder/file.js

Thanks. This isn’t hosted on any other website. Just my local computer.

I tried it with 2 and 1 slashes and it still didn’t work.

Use a relative path instead of an absolute path

https://www.w3schools.com/html/html_filepaths.asp

This file is in the same folder as the HTML file. This is on a Mac.

The file path is /Users/darrinmaier/Desktop/javascriptBasics/index.html

and

/Users/darrinmaier/Desktop/javascriptBasics/js.js

Hey Thanks for the response. It did not work.

If it helps, I’m using Atom as an editor. In my version of Atom, if I type in a link or file path it turns blue. It won’t turn blue unless I start local paths with “file:///”.

Even correcting the underscore and the uppercase J didn’t work.

I got it. It wasn’t saving the index properly. Thanks so much all!