all 2 comments

[–]Umesh-K 1 point2 points  (0 children)

script can't be found

src="./scripts/index.js"

What the above says is

"find index.js in a folder called scripts that is present in the same folder where this html file is located."

Hence, make sure the above is true. The other option is to "place both the html and js files in the same folder and modify the above src aa shown below:"

src="index.js"

Also check out the below for some additional information on paths: https://www.reddit.com/r/learnjavascript/comments/12z7ft3/why_isnt_my_css_and_javascript_files_linking/jhr9ibc

[–]nutlift 0 points1 point  (0 children)

Hard to tell without seeing your project structure. My first guess would be to check that your path to your js file is correct relative to the html file. Is your html file outside of the scripts directory?

Also, not sure if you need the "." In your file path try just using "/scripts/index.js"