I can't figure out why my JavaScript file won't display when linked
问题 I can't figure out what's wrong here and I'm not getting any output from the Javascript file. I am trying to use src to be able to type my javascript file outside of the index file. This just prints the header from the html file "A test heading" without printing the text variable. If I type the code within the html file it works fine. Both scripts are in the same folder. <!DOCTYPE HTML> <html> <head> <h2> A Test Heading </h2> <script language = "JavaScript" src="/slider.js"></script> </head>